Turtle Graphics with Conditionals
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
import turtle
turtle.showturtle()
turtle.shape("turtle")
turtle.pencolor('red')
for x in range(20):
turtle.forward(100)
if x % 2 == 0:
turtle.left(175)
else:
turtle.left(225)import turtle
turtle.showturtle()
turtle.shape("turtle")
turtle.pencolor('red')
for x in range(10):
if x % 2 == 0:
turtle.forward(25)
turtle.right(45)
else:
turtle.forward(25)
turtle.right(45)