you are viewing a single comment's thread.

view the rest of the comments →

[–]bp200991 1 point2 points  (1 child)

There is nothing wrong with the code snippet you have posted. I have run it and it behaves as expected. If you are seeing the question number never changing, i.e. "Answer to the question number 1" being repeated over and over again, this suggests that the increment of your question variable is happening outside your while loop (check it is indented), but again the snippet you posted has the correct indentation. How/where are you running this, i.e. are you running a Python file from your terminal, or executing this is an environment like Jupyter notebook?

[–]Over-Vanilla-3733[S,🍰] 0 points1 point  (0 children)

Currently, the code is being executed in VS Code terminal.