the program is not going into the if loop but directly in the else one and is saying 'wrng answer' even if it is right. where is the problem? (i will give brainliest please HELPPPPPPPP) this is python btw

the program is not going into the if loop but directly in the else one and is saying wrng answer even if it is right where is the problem i will give brainliest class=

Respuesta :

tonb

Answer:

convert the input to an integer:

 ans = int(input(str(num1)+"+"+str(num2)+"="))

Explanation:

Your code is comparing an integer to a string, which will always return false. If you cast your input to an integer using the int() function, your problem should be solved.

ACCESS MORE
EDU ACCESS
Universidad de Mexico