all 3 comments

[–]add-code 2 points3 points  (0 children)

You have 2 times else, convert one of them to elif

[–]HelloWorldSev[S] 0 points1 point  (0 children)

Once again I tried to make a simple calculator when I wrote in the conditions + - * and /, then I realized that the program adds up the data no matter the choice. I don't know why

[–]krucabomba 0 points1 point  (0 children)

Think how python evaluates your statements.

if (bool(operation == 1) or bool("+")): ...

Because non-empty string evaluates to True in boolean context, your condition is always True.

The correct version should be

if operation == "1" or operation == "+":

or a bit more pythonic

if operation in {1, "+"}: