+ 1
Please help me to output the first number + operator + second number and it is not divided by anything, I don't know why
2 Respuestas
+ 4
The condition at line 13 is always true, no matter the input.
(operator == "x") or "*":
Let's say operator is "/"
operator == "x" is False
Then:
False or "*"
"*" Is True(thy) because it's a non-empty string. Hence, the condition's body runs. The next elif (division) is never reached because of that. That's why division won't work.
Try:
elif operator == "x" or operator == "*":
Remember that on SoloLearn you have to enter input on saparate lines this way :
10
/
5
+ 1
Thanks so much! Now I get it. I really didn't know about it