23
QuizMultiple Choice

Use Data Structures — Cumulative exam

Question 23 • Introduction to Information Technology - EL3701

The admission booth at the show requires each person to enter their age. Then the following program executes:if 22 > age > 14: print (“Student price is $8.”)When age = 16, what action would the program execute?

Answer
A
print “16”
B
print “Student price is $8.”
C
print “14”
D
print “Student price is $14.”

Explanation

The condition 22 > age > 14 means the age must be less than 22 and greater than 14. When age is 16, both parts are true, so the program executes the print statement and displays “Student price is $8.”

AI-written and checked against the verified answer.

Previous
Next