Bird
0
0

What will be the output of this code?

medium📝 Predict Output Q13 of 15
Python - Data Types as Values
What will be the output of this code?
print(5 > 3)
AError
BFalse
C5 > 3
DTrue
Step-by-Step Solution
Solution:
  1. Step 1: Evaluate the comparison

    The expression 5 > 3 checks if 5 is greater than 3, which is true.
  2. Step 2: Understand print output

    Printing a Boolean expression prints True or False accordingly. Here it prints True.
  3. Final Answer:

    True -> Option D
  4. Quick Check:

    5 > 3 is True [OK]
Quick Trick: Compare values; print shows True or False [OK]
Common Mistakes:
MISTAKES
  • Thinking it prints the expression as text
  • Confusing True with string 'True'
  • Expecting an error from comparison

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes