0
Where is error plz
from turtle import* color("red") for q in range(20): forward(200) left(200) print(q)
1 Answer
0
You need to creat the turtle. All you did was import its module.
Try:
import turtle
w = turtle.Screen() #making window
t = turtle.Turtle() #making the turtle
#Now you can tell the turtle what to do #using dot(.)...
for q in range(20): #Do this 20 times:
t.forward(200) #"t"move forward 200
t.left(200) # "t" turn 200 deg left
w.mainloop() #keep the window open #waiting for user
You have to use the dot operator to tell a specific turtle to move or have a variable set in a function. If not then you are basically shouting directions at a blank wall. Nothing will happen