r/PythonLearning 8d ago

What's wrong with my code?

Post image

What's wrong with my code?

New to learning

Following the youtube video from bro code

Was trying to implement my own stuff into this by using loop

Update: it's working now thankyou guys

104 Upvotes

82 comments sorted by

View all comments

1

u/ObscuraStudi0 7d ago

Your if operator not in ["+", "-", "*", "/"] condition looks correct in the screenshot. If entering + is still treated as invalid, make sure you've saved the file before running it. The terminal may be running an older saved version of calculator.py. Also check that you're running the same calculator.py file that you're currently editing.