Change your code to:
if user_input==1:
print(divide(first_num,second_num))
elif user_input==2:
print(multiply(first_num,second_num))
elif user_input==3:
print(subtract(first_num,second_num))
elif user_input==4:
print(add(first_num,second_num))
else:
print(add('Error: wrong choice'))
This way, you don't get wrong result, you are told that the user choice was not recognized.
Quote:
I tried using different numbers
As for the problem in code, solution 1 give you the reason.
All input is a string, so you need to convert to integer or compare with string.