mardi 2 février 2021

How to Stop Turtle (Python) when it reaches certain distance

I would like to ask if it is possible to store this in as an array/list so i can use for loop range to identify if its equal to the possible limit of a canvas if so may i know how thanks for the help just a newb :(

while (turtle):
possible = randint(0,3)
if possible == 0:
    turtle.forward(randint(0,1))
elif possible == 1:
    turtle.back(randint(0,1))
elif possible == 2:
    turtle.left(uniform(0,75))
    turtle.forward(randint(0, 1))
elif possible == 3:
    turtle.right(uniform(-75,0))
    turtle.forward(randint(0, 1))



Aucun commentaire:

Enregistrer un commentaire