QUESTION IMAGE
Question
a restaurant recorded the ages of customers on two separate days. you are going to write a program to compare the number of customers in their teens (ages 13 to 19). what is the missing line of code to count the number of customers in their teens? customerages = 13, 3, 11, 24, 35, 25, 15, 18, 1 countteens = 0 for item in customerages: ____: countteens = countteens + 1 if 13 <= item <= 19 if 13 < item < 19 if 13 <= item0 <= 19 if 13 < item0 < 19
The goal is to count customers in the age - range 13 to 19. In Python, we need an if statement to check if each item (age) in the customerAges list is within this range. The correct range check should be inclusive of 13 and 19, and we are checking each individual age value (not an element of a sub - list as in the options with [0]). So the condition should be if 13 <= item <= 19.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
if 13 <= item <= 19