import turtle
player1 = turtle.Turtle()
world = turtle.Screen()
world.bgcolor("black")
world.listen()
player1.penup()
player1.color("red")
player1.shape("turtle")
def moveUp():
player1.seth(90)
player1.sety(player1.ycor() +20)
def moveDown():
player1.seth(270)
player1.sety(player1.ycor() -20)
def moveLeft():
player1.seth(180)
player1.setx(player1.xcor() -20)
def moveRight():
player1.seth(0)
player1.setx(player1.xcor() +20)
world.onkey(moveUp, "Up")
world.onkey(moveDown, "Down")
world.onkey(moveLeft, "Left")
world.onkey(moveRight, "Right")
you'll need this for classwork today, so copy this if you don't have it