Я пытался заставить этот калькулятор работать, но он всегда говорит, что мой выбор неверен. Я попробовал действительные числа, и по некоторым причинам это не работает. Любая помощь будет оценена. Я все еще новичок в python и в программировании в целом. Спасибо.
#Calculator
print("1.Addition")
print("2.Substraction")
print("3.Multiplication")
print("4.Divison")
#Choose the calculation
Choice=int(input("Enter your choice (1/2/3/4): "))
#Inserting the numbers
Num1=float(input("Insert your first number: "))
Num2=float(input("Insert your second number: "))
if Choice == '1':
ans= Num1 + Num2
print("Your answer is: ",ans)
elif Choice == '2':
ans= Num1 - Num2
print("Your answer is: ",ans)
elif Choice == '3':
ans= Num1*Num2
print("Your answer is: ",ans)
elif Choice == '4':
ans= Num1/Num2
print("Your answer is: ",ans)
else:
print("Invalid choice. ")