हिंदी

Which of the following expressions in Python evaluates to True? - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Which of the following expressions in Python evaluates to True?

विकल्प

  • 2>3 and 2<3

  • 3>1 and 2

  • 3>1 and 3>2

  • 3>1 and 3<2

MCQ
Advertisements

उत्तर

3>1 and 3>2

Explanation:

The and operator is True only when both comparisons are True. 3>1 is True, and 3>2 is True, so the whole expression is True. Other choices have a False part (or in one case evaluate to a non-boolean truthy value like 2), so they do not evaluate to the boolean True.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×