Ejemplo: tortuga python onkeypress
#Importing the module
import turtle
#The window creation
window = turtle.Screen()
#The turtle creation
p = turtle.Turtle()
p.color("black")
p.penup()
#the function
def move():
p.forward(20)
#The event listener
turtle.listen()
turtle.onkeypress(move(),"w")
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)