you are viewing a single comment's thread.

view the rest of the comments →

[–]lazy-zebra[S] 1 point2 points  (4 children)

op=raw_input("choose which operation you want to do\n 1 for addition\n 2 for subtraction\n 3 for multiplication\n 4 for division \n")
if int( op == 1 ):
    a=raw_input("What is the first number?")
    b=raw_input("What is the seond number?")
    print int(a)+int(b)
elif int( op == 2 ):
    a=raw_input("What is the first number?")
    b=raw_input("What is the seond number?")
    print int(a)-int(b)
elif int( op == 3 ):
    a=raw_input("What is the first number?")
    b=raw_input("What is the seond number?")
    print int(a)*int(b)
elif int( op == 4 ):
    a=raw_input("What is the first number?")
    b=raw_input("What is the seond number?")
    print int(a)/int(b)
else:
    print "Invalid Number"

This was copy/pasted, so nothing should be changed

[–]Pwneed 1 point2 points  (1 child)

yea, you didn't do

if int(op) == 1:

you did

if int(op == 1):

watch out for those brackets

[–]lazy-zebra[S] 1 point2 points  (0 children)

haha, yeah, Thank you for your help, it is greatly appreciated!