Skip to content

Instantly share code, notes, and snippets.

@inavadeep1205
Created May 4, 2023 07:46
Show Gist options
  • Save inavadeep1205/4612d044ef08d9c7b857e8c530058a9b to your computer and use it in GitHub Desktop.
Save inavadeep1205/4612d044ef08d9c7b857e8c530058a9b to your computer and use it in GitHub Desktop.
#Basic Calculator
number1 = int(input("Enter your first number = "))
operator = input("Enter your operator = ")
number2 = int(input("Enter your second number = "))
if operator == "+":
print("Answer = ", number1+number2)
elif operator == "-":
print("Answer = ", number1-number2)
elif operator == "*":
print("Answer = ", number1*number2)
elif operator == "/":
print("Answer = ", number1/number2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment