Question Detail
Question
Consider the following code from the 'Classroom Activity':
age = 14; if age >= 18: print("Adult"). What will be the output?
Correct Answer
Option D is the correct answer.
Detailed Explanation
Page 16, 'Classroom Activity', case 2:
age = 14; if age >= 18: print("Adult"). Since 14 is not greater than or equal to 18, the condition is false. The print statement inside the if block will not be executed, resulting in no output.
Hint
The condition 'age >= 18' needs to be true for 'Adult' to be printed.