Error with if/elif statements and turtle commands
<p>I have been having an odd error with if/else statements. For some reason, when I use this code (intro project to turtle graphics)</p>

<pre><code>from turtle import *
print('Hello. I am Terry the Turtle. Enter a command to make me draw a line, or ask for help.')
on = True
shape('turtle')
if on == True:
   c1 = str(input('Enter command: ')
   if c1 == 'forward':
      c2 = eval(input('How many degrees? ' ))
      right(c2)
   elif c1 == 'right':
      c2 = eval(input('How many degrees? ' ))
      right(c2)
   elif c1 == 'left':
      c2 = eval(input('How many degrees? ' ))
      left(c2)
   elif c1 == 'goodbye':
      print('Bye!')
      on = False
   else:
      print('Possible commands: forward, right, left, goodbye.')
</code></pre>

<p>For some odd reason, the <code>if</code> and <code>elif</code> statements keep returning syntax errors, yet they do not seem to have any visible errors. I tried doing similar things, but it kept on returning syntax errors. Is there any way to fix this?</p>

<p>Sorry if this is a dumb question, this is my first time here and I am just really confused.</p>

<p>For c1, you don't have to indicate it is a string as inputs are already strings
And no need for "eval".</p>

<p>Try:</p>

<pre><code>from turtle import *
print('Hello. I am Terry the Turtle. Enter a command to make me draw a line, or ask for help.')
on = True
shape('turtle')
while on == True:
   c1 = input('Enter command: ')
   if c1 == 'forward':
      c2 = int(input('How far forward? ' ))
      forward(c2)
   elif c1 == 'right':
      c2 = int(input('How many degrees? ' ))
      right(c2)
   elif c1 == 'left':
      c2 = int(input('How many degrees? ' ))
      left(c2)
   elif c1 == 'goodbye':
      print('Bye!')
      on = False
   else:
      print('Possible commands: forward, right, left, goodbye.')
</code></pre>

python turtle-graphics