Main content
Course: Intro to computer science - Python > Unit 3
Lesson 3: For loopsChallenge: Wait times
Instructions
Step 1
Simulate a full shift
Alicia’s family owns a popular quick service restaurant. Her uncle staffs one cashier on a shift, yet the line of customers often wraps around the block. How can Alicia reduce customer wait times?
The current program simulates just one minute of service, but the restaurant serves from 12-5pm every day.
- Add a
for
loop that simulates service for the total number of minutes in the 5 hour shift. - Make sure to print the number of customers waiting in each state at the end of each minute.
Consider which lines of the program should only run once and and which lines should repeat every minute the restaurant is open.