import turtle wn = turtle.Screen() # create window for turtle t1 to draw wn.bgcolor("white") # set background color of the window t1 = turtle.Turtle() t1.shape("arrow") t1.circle(100) t1.circle(50) t1.penup() print(t1.position()) # get current position (x,y) print(t1.xcor()) # get current x coordinate print(t1.ycor()) # get current y coordinate # t1.goto(t1.xcor+10, t1.ycor+10) # TypeError: unsupported operand type(s) for +: 'method' and 'int' print(round(t1.xcor())) # get current x coordinate, then round it to the nearest integer print(round(t1.ycor())) # get current y coordinate, then round it to the nearest integer t1.goto(round(t1.xcor()), round(t1.ycor())+40) # t1.goto(round(t1.xcor()), round(t1.ycor())-40) t1.color("red") print(t1.position()) # get current position (x,y) print(t1.xcor()) # get current x coordinate print(t1.ycor()) # get current y coordinate t1.pendown() t1.circle(-50) t1.circle(-100) wn.mainloop() # wait for user to close the window