+ 6
The only solution is to retype the because sometimes the character has some hidden special characters in it, mostly from internet examples: By the way, I've noticed some bugs in your code that may cause errors. ( 1 ) string.capitalize() will not change the value of the original string, therefore you have to assign it to a variable: ( 2 ) When performing comparisons with logical operators, and if you want to compare the same variable with different values, it should look like this: if variable == "value1" or variable == "value2": Additional: You dont need to have "str" before input() as it already takes string by default. https://code.sololearn.com/cdr5bf5TlSCA/?ref=app
23rd Jan 2021, 7:48 AM
Nicko James Barata
Nicko James Barata - avatar
+ 4
The problem is happening after the : of your if statements and before print(num operation num1) backspace from print until you delete the : then retype from there. Did you use TAB?
23rd Jan 2021, 8:05 AM
Rik Wittkopp
Rik Wittkopp - avatar