Let's break down the code step by step:
This line assigns the value 75 to the variable marks. It represents a student's marks.
This checks if the marks are 90 or more.
Since 75 is not greater than or equal to 90, this condition is False, so "Excellent" will not be printed.
This is a chained condition: it checks if the marks are between 60 and 89 (inclusive of 60, but less than 90).
Since 75 is in this range, the condition is True, so "Good" will be printed.
✅ Output:
Let me know if you want a version with else or elif too!


0 Comments:
Post a Comment