Skip to content

Instantly share code, notes, and snippets.

@eddydesh
Created March 28, 2020 05:16
Show Gist options
  • Save eddydesh/1b01019f1319fedd49ad16549ea0024f to your computer and use it in GitHub Desktop.
Save eddydesh/1b01019f1319fedd49ad16549ea0024f to your computer and use it in GitHub Desktop.
number1 = int(input("Please enter first no: "))
number2 = int(input("Please enter second no: "))
print("What operation would you like to perform?")
ops = input(" 1. Sum\n 2. Sub\n 3. div\n 4. multi\n Press the number in front of operation and press Enter")
if ops == "1":
sum = number1 + number2
print("The result is: ", sum)
elif ops == "2":
sub = number1 - number2
print("The result is: ", sub)
elif ops == "3":
div = number1 / number2
print("The result is: ", div)
elif ops == "4":
multi = number1 * number2
print("The result is: ", multi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment