-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path58FiftyEight.py
More file actions
34 lines (28 loc) · 794 Bytes
/
Copy path58FiftyEight.py
File metadata and controls
34 lines (28 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
while True:
print("\n--- Simple Calculator ---")
print("1. Add")
print("2. Subtract")
print("3. Multiply")
print("4. Divide")
print("5. Exit")
choice = input("Enter your choice (1-5): ")
if choice == '5':
print("Exiting... Goodbye!")
break
a = float(input("Enter first number: "))
b = float(input("Enter second number: "))
if choice == '1':
print("Result:", a + b)
elif choice == '2':
print("Result:", a - b)
elif choice == '3':
print("Result:", a * b)
elif choice == '4':
if b != 0:
print("Result:", a / b)
else:
print("Error: Division by zero!")
else:
print("Invalid choice! Try again.")
from Signature_folder.Signature import sign
sign()