Bird
0
0

What will be the output of this code?

medium📝 Predict Output Q4 of 15
Python - Conditional Statements
What will be the output of this code?
score = 75
if score >= 90:
    print("Excellent")
elif score >= 60:
    print("Good")
else:
    print("Try again")
AExcellent
BTry again
CGood
DNo output
Step-by-Step Solution
Solution:
  1. Step 1: Check the first condition

    score >= 90 is False because 75 is less than 90.
  2. Step 2: Check the elif condition

    score >= 60 is True because 75 is greater than 60, so it prints "Good".
  3. Final Answer:

    Good -> Option C
  4. Quick Check:

    Score 75 triggers elif block [OK]
Quick Trick: Check conditions top to bottom; first true runs [OK]
Common Mistakes:
MISTAKES
  • Printing 'Excellent' because 75 is less than 90
  • Ignoring elif and going to else
  • Expecting no output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes