Created
September 8, 2022 11:06
-
-
Save code2be/20eebac21cf01d66d2c74524c12c55ef to your computer and use it in GitHub Desktop.
simple_calc.py
This file contains hidden or 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
x = float(input("Enter first number")) | |
y = float(input("Enter second number")) | |
o = input("Enter operator") # + - / * % | |
if o == "+": | |
print(x + y) | |
elif o == "-": | |
print(x - y) | |
elif o == "*": | |
print(x * y) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment