Jan-09-2020, 07:24 PM
I wrote the code below to try to get the turtle below to move the amount input, but I cannot seem to figure out why defining c will not work. How can I get the input to work? I keep getting an error message "ExternalError: TypeError: Cannot read property 'instance' of undefined on line 13." Line 13 is turtle.forward(int©).
import turtle myTurtle = turtle.Turtle() myTurtle.forward(100) myTurtle.right(90) myTurtle.penup() myTurtle.forward(100) myTurtle.right(90) myTurtle.pendown() myTurtle.pencolor("green") myTurtle.right(90) myTurtle.forward(100) c=input(int()) turtle.forward(int(c)) myTurtle.back(100)