Python Programming - Operators - Discussion
Discussion Forum : Operators - General Questions (Q.No. 8)
8.
What is the output of the following code?
num1 = 10
num2 = 20
num3 = 30
result = num1 < num2 and num3 > num2
print(result)
Answer: Option
Explanation:
In the code, the logical operator and is used to combine two conditions. The first condition
num1 < num2
is True
, and the second condition num3 > num2
is also True
. So, the overall result is True
.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers