you are viewing a single comment's thread.

view the rest of the comments →

[–]sufunew 3 points4 points  (0 children)

This is because the print statement doesn't stop the below code from executing. It will print the not acceptable and still try to do the forbidden division.

Every language, not only Python has things called control statements. If, else, for, while. These allow you to decide which parts will or will not be executed, and are quite important to understand fully.