Skip to content

Instantly share code, notes, and snippets.

@writer0713
Created September 4, 2025 01:04
Show Gist options
  • Save writer0713/e58ec6f542bfd4093712d5a6ceae8fc3 to your computer and use it in GitHub Desktop.
Save writer0713/e58ec6f542bfd4093712d5a6ceae8fc3 to your computer and use it in GitHub Desktop.
nomad_assignment4.py
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