Lab 2
Lab 2
return x + y
return x * y
return x / y
print("Select operation.")
print("1.Add")
print("2.Subtract")
print("3.Multiply")
print("4.Divide")
while True:
try:
except ValueError:
continue
if choice == '1':
print(num1, "+", num2, "=", add(num1, num2))
if next_calculation == "no":
break
else:
print("Invalid Input")
Ans: A palindrome is a word, phrase, or sequence that reads the same backward as forward,
e.g., madam, nurses run, etc.
print(fun("madam"))
Output: True