In Python there is a function you can call, input()
. But you are not calling it. You put quotes around it, so you are just referencing a string that contains the letters 'i', 'n', 'p', 'u', 't', '(', ')'.
Remove the quotes so you actually call the input()
function.
EDIT: From your comment below, it looks like you are using Python 2.x; so you should use raw_input()
. raw_input()
just returns whatever string the user typed; input()
tries to evaluate it as a value.
x = input() # if user types "2", x is set to the number 2
x = raw_input() # if user types "2", x is set to the string "2"
EDIT: You need to make sure the pen is down, you probably want the turtle to go more than just 1 when going forward or back, and you need to make the screen appear.
I suggest you read a basic intro to turtle graphics in Python.
http://www.blog.pythonlibrary.org/2012/08/06/python-using-turtles-for-drawing/
Before the start of the while loop, try putting this:
screen = turtle.getscreen()
That should be enough to make the graphics screen pop up.
Good luck and have fun.