Python Forum
Hi need help for a course - complete beginner
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hi need help for a course - complete beginner
#1
Hi new to python and I need some help with one of my courses questions:
https://gyazo.com/7f963d31452efaa8906a3de2b08bbd80

I have this so far but it's not giving the same answer result as the course expects:
https://gyazo.com/e1267c3c1d4f29df4958640aa6354a59

Please help as soon as any of you can!
Thank you.
Yoriz write Jul-11-2021, 02:22 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Attached Files

Thumbnail(s)
   
Reply
#2
Switch radians and sin
import math

print(math.sin(math.radians(30)))
Output:
0.49999999999999994
Reply
#3
Hi I figured it out!
what I was doing is getting the sin of the integer and then turning it into degrees or something, when I want to turn it into degrees first and then do the sin.

import math
integer = int(input('Enter an angle in degrees >'))
sin_value = math.radians(math.sin(integer))
print('The sin of', integer ,'degrees is', sin_value)
Yoriz write Jul-11-2021, 02:49 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help running an r package - COMPLETE PYTHON BEGINNER harrysmithhjs 2 3,655 Jan-24-2017, 02:48 PM
Last Post: harrysmithhjs

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020