from turtle import Turtle, Screen
import random

timmy = Turtle()

screen = Screen()
   def forward():
       timmy.forward(10)
   def backward():
       timmy.backward(10)
   def cc():
       timmy.lt(10)
   def ct():
       timmy.rt(10)
   def ck():
       timmy.clear()
       timmy.reset()

 screen.listen()
 screen.onkey(key="w", fun=forward)
 screen.onkey(key="s", fun=backward)
 screen.onkey(key="a", fun=cc)
 screen.onkey(key="d", fun=ct)
 screen.onkey(key="c", fun=ck)


screen.exitonclick()
