Put any numbers in and the program will give you the answer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | print "Calculator"
Firstnumber = input("Enter your first number: ")
Firstoperator = raw_input("Enter you operator: ")
Secondnumber = input ("Enter your second number: ")
if Firstoperator == "+":
Firstnumber + Secondnumber
print Firstnumber + Secondnumber
if Firstoperator == "*":
Firstnumber * Secondnumber
print Firstnumber * Secondnumber
if Firstoperator == "/":
Firstnumber / Secondnumber
print Firstnumber / Secondnumber
if Firstoperator == "-":
Firstnumber - Secondnumber
print Firstnumber - Secondnumber
|