Created
November 8, 2016 12:51
-
-
Save daniel-obrien/6661c35758a6358061b4e09ba295e775 to your computer and use it in GitHub Desktop.
Simple Calclator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Welcome to the Basic Calculator!") | |
number1=(int(input("Please enter your First Number"))) | |
number2=(int(input("Please enter your Second Number"))) | |
choice=input("Would you like to Add, Subtract, Multiply or Divide? (Use Symbols)") | |
if choice == "+": | |
answer1 = number1+number2 | |
print (answer1) | |
elif choice == "-": | |
answer2 = number1-number2 | |
print (answer2) | |
elif choice == "x": | |
answer3 = number1*number2 | |
print (answer3) | |
elif choice == "÷": | |
answer4 = number1/number2 | |
print (answer4) | |
else: | |
print("ERROR") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment