(Mar-28-2023, 08:32 AM)Gribouillis Wrote: In a sequence such as
if condition1: ... elif condition2: ... elif condition3: ... else: ...Only the code corresponding to the first condition that evaluates to True is executed. The code in the other branches are not executed. In your case, theuser_input >= LIMIT_NUMBER
condition evaluates to True when the user inputs 12.
Oh, I get it now! Python only interprets the first statement it detects as
True
. The others, whether True
or False
, will be ignored. I now have a better understanding of the interpreter's execution flow, thank you very much Gribouillis; you have saved me! ![Smile Smile](https://python-forum.io/images/smilies/smile.png)