Question Detail
Question
Consider the following Python code snippet:
What will be the output when this code is executed?
x = 15if x > 10: print(x)What will be the output when this code is executed?
Correct Answer
Option B is the correct answer.
Detailed Explanation
As seen in 'Classroom Activity' on page 16 (case 1),
x is 15. The condition x > 10 (15 > 10) is True, so print(x) will execute, printing 15.
Hint
Evaluate the condition with the given value of 'x'.