MCQ Answer

What will be the result of the expression: 15 and 10?

What will be the result of the expression: 15 and 10?

व्यंजक 15 और 10 का परिणाम क्या होगा?
Topic : Operators Expressions and Python Statements

A. 5

B. 1

C. 10

D. 0




Correct Answer is :

C. 10



Explanation

When the and operator is used with numbers like 15 and 10, Python doesn't perform a typical boolean AND operation. Instead, it evaluates the truthy values and returns the last evaluated operand if both operands are truthy.


Here’s how it works:


15 is considered truthy (non-zero values are truthy).

10 is also truthy (since it's non-zero).

The and operator evaluates both operands and returns the second operand (10 in this case) because both operands are truthy.


The result will be 10.


Why 10?

In Python, the and operator returns:


The first operand if it is falsy (like 0, None, False, etc.).

Otherwise, it returns the second operand.

Since both 15 and 10 are truthy, Python returns the second operand, which is 10.

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad