import turtle
import random
wn = turtle.Screen() #sets the screen
wn.setup(1000,900)
wn.screensize(2000,2000)
ad = turtle.Turtle() #names the turtle
ad.shape("circle") #changes turtles or "ad's" shape
ad.speed("fastest")
r = int(60) #CHANGES THE SIZE OF THE WRITING
x = int(-950)
y = int(200)
ad.penup()
ad.goto(x,y)
def enter():
ad.penup()
y -= 100
ad.goto(x,y)
wn.onkey(lambda: enter(), "Return")
wn.listen()
Trying to do an enter button in turtle but this wont work. It says that there is an error with the local variable.
xandyhave a scope problem.