← back to unit
Easy
# searching easy
Are All Seats Filled?
The puppet show can't start until EVERY seat is taken. 🎭
You get a list of seats, each taken or free. Print showtime if all are taken, or not yet if any seat is still free.
Example:
Input: seats = ["taken", "taken", "taken"]
Output: showtime
Every seat says taken, so the all-taken flag never gets knocked down — print showtime.
Input: seats = ["taken", "free", "taken"]
Output: not yet
The second seat is free, which flips the flag to False — print not yet.
💡 need a hint?
srch-all-seats-filled.py🔒 given lines are locked — write your code in between
loading...