Lesson 46 of 51 · Advanced
Using the math Module
The math module gives you sin, cos, pi, and more.
Python
from turtle import *
import math
bgcolor("black")
color("hotpink")
pensize(2)
speed(0)
for i in range(360):
x = i * 2 - 360
y = math.sin(math.radians(i)) * 100
goto(x, y)
done()Output

1
Common Functions
math.sin(x), math.cos(x), math.pi, math.sqrt(x).