Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle, math
- turtle.speed(0)
- min = input("From: ")
- max = input("Until: ")
- #draws the X-axis
- turtle.fd(max)
- #draws the Y-axis
- turtle.goto(0, 0)
- turtle.penup()
- turtle.lt(90)
- turtle.fd(50)
- turtle.pendown()
- turtle.bk(100)
- turtle.penup()
- turtle.fd(50)
- turtle.pendown()
- turtle.rt(90)
- #draws the curve
- turtle.goto(min, 0)
- for x in range(min, max):
- y = 50*(math.sin(math.radians(x)))
- turtle.goto(x, y)
- x += 1.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement