Post

@PythonPr 1 is printed. The if statement continues to run until it finds a True result. The first True result is to print 1.
English

@PythonPr I have been practicing python on my own and have learned a little bit. I wish there was a mentor out there who could teach me more. I am a good listener and I have enough common sense to understand. Is there anybody out there?
English

@PythonPr Answer: 1
Since num = 75, the first condition (<= 50) is false.
It then checks <= 75, which is true → prints "1" and stops there 👍
English

@PythonPr 1. When using `elif`, the first condition that is met will be considered, and the rest will be ignored.
English

@PythonPr Output's 1. First true condition wins, rest gets skipped. Simple as that.
English

@PythonPr I will be printed
English

























