- Code: Select all
In1 = input('Input your first Number');
In2 = input('Input your second Number');
op = raw_input('Input your desired Operation');
if op == '+':
answer = In1 + In2
elif op == '-':
answer = In1 - In2
answer = 'Please enter correct values. Use only + or -'
When I try it out in the shell, I can enter values which are then printed out for me but cannot enter an operation - I get syntax error. What am I doing wrong and how can I fix it?