Skip to content

Instantly share code, notes, and snippets.

@daniel-obrien
Created November 8, 2016 12:51
Show Gist options
  • Save daniel-obrien/6661c35758a6358061b4e09ba295e775 to your computer and use it in GitHub Desktop.
Save daniel-obrien/6661c35758a6358061b4e09ba295e775 to your computer and use it in GitHub Desktop.
Simple Calclator
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