Advance Calculator
Advance Calculator
return x + y
# Introduction message
print("WELCOME TO THE CALCULATOR OF NURAZ!")
print("YOU ARE REQUESTED TO NOT LEAVE!")
while True:
print("\n1. Add\n2. Subtract\n3. Multiply\n4. Divide\n5. Exit")
choice = input("Choose an operation (1/2/3/4/5): ")
if choice == '5':
print("AYE AYE SIR! SELF DESTRUCTING INITIALIZED")
break
if choice == '1':
print("Addition Operation Selected")
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
print(f"Result: {add(num1, num2)}")
else:
print("Invalid choice. Please try again.")