(adsbygoogle = window.adsbygoogle || []).push({});
print "1 = Press for addition"
print "2 = Press for subtraction"
print "3 = Press for multiplication"
print "4 = Press for division"
print
selection=input("Select an option: ")
if selection == 1:
a1=input("Enter the first number: ")
a2=input("Enter the second number: ")
ar=a1+a2
print ar
elif selection == 2:
s1=input("Enter the first number: ")
s2=input("Enter the second number: ")
sr=s1-s2
print sr
elif selection == 3:
m1=input("Enter the first number: ")
m2=input("Enter the second number: ")
mr=m1*m2
print mr
elif selection == 4:
d1=input("What is the first number: ")
d2=input("What is the second number: ")
dr=d1/d2
print dr
else:
print "You didnt even choose any option!"
I just want feedback on this code i created,
I know that its very basic - however i just started python and i intended to create a code that was based on; printing, variables, if statements and operators.
Any help would be appreciated