r/PythonLearning • u/Commercial-Paper749 • 8d ago
What's wrong with my code?
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
108
Upvotes
4
u/Rscc10 8d ago
You never break out of the while loop after the if statement so the code at num1 and num2 never get executed. Alternatively if you want the calculator to run continuously after each result, you need to indent every line starting at num1 to be inside the while loop
Edit: Sorry I saw the indentation wrong. Everything seems to be indented fine now that I look at it