lundi 30 mars 2020

how do i make a turtle move randomly

the turtle rec is the turtle i want to move randomly i have been trying some things but nothing has worked

import turtle

wn = turtle.Screen()
wn.setup(1440, 900)
wn.title("DVD loding Screen")

border_pen = turtle.Turtle()
border_pen.speed(0)
border_pen.color("black")
border_pen.penup()
border_pen.setposition(1440, 900)
border_pen.pendown()
border_pen.pensize(3)
border_pen.hideturtle()

rec = turtle.Turtle()
rec.color("red")
rec.shape("square")
rec.shapesize(5, 10)
rec.setpos(0, 0)
rec.speed(0)



turtle.done()



Aucun commentaire:

Enregistrer un commentaire