Created
September 4, 2025 01:04
-
-
Save writer0713/e58ec6f542bfd4093712d5a6ceae8fc3 to your computer and use it in GitHub Desktop.
nomad_assignment4.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
playing = True | |
while(playing): | |
a = int(input("Choose a number:\n")) | |
b = int(input("Choose another one:\n")) | |
operation = input( | |
"Choose an operation:\n Options are: + , - , * or /.\n Write 'exit' to finish.\n" | |
) | |
if operation == "exit": | |
break | |
elif operation == "+": | |
print(a + b) | |
elif operation == "-": | |
print(a - b) | |
elif operation == "*": | |
print(a * b) | |
elif operation == "/": | |
print(a / b) | |
else: | |
print("operation is not valid") | |
# /YOUR CODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment