Question Detail
Question
Based on the 'Classroom Activity' on page 16, what is the output of this Python code?
age = 14if age >= 18: print('Adult')
Correct Answer
Option C is the correct answer.
Detailed Explanation
In 'Classroom Activity' on page 16 (case 2),
age is 14. The condition age >= 18 (14 >= 18) is False. Therefore, the indented print('Adult') statement will not be executed, resulting in no output.
Hint
What happens if the 'if' condition is False and there is no 'else' clause?