Python Forum
general def coding
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
general def coding
#4
Quote:from math import cos,sin,tan,pi
theta = 0.01
steps = int ((100*pi/theta))
how many steps is that? well in my prompt:
>>> from math import cos,sin,tan,pi
>>> theta = 0.01
>>> steps = int ((100*pi/theta))
>>> steps
31415
how many do you need to make it back to your start point?
>>> from math import cos,sin,tan,pi
>>> theta = 0.01
>>> steps = int ((2.01*pi/theta))
>>> steps
631
it's always nice to have an emergency stop button- :)
Reply


Messages In This Thread
general def coding - by Agusben - Apr-01-2020, 02:55 PM
RE: general def coding - by DeaD_EyE - Apr-01-2020, 03:33 PM
RE: general def coding - by Agusben - Apr-01-2020, 06:27 PM
RE: general def coding - by joe_momma - Apr-01-2020, 09:54 PM
RE: general def coding - by Agusben - Apr-02-2020, 12:12 AM
RE: general def coding - by joe_momma - Apr-02-2020, 03:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] general def coding Agusben 1 1,941 Apr-07-2020, 10:18 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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