What is the output of the following code?
num1 = 10
num2 = 20
num3 = 30
result = num1 < num2 and num3 > num2
print(result)
Answer: A
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.
Discuss About this Question.