
Checkpoint
Checkpoint: The Busy Ferry
The Moonwell ferry is busy tonight! Each boat has a few seats, and a crowd of passengers is waiting. The ferry master needs a quick report.
This checkpoint mixes everything from this chapter:
variables, //, % and gluing strings with +.
Remember: // tells you how many whole times something
fits, and % tells you what is left over.
Assignment
Use the variables, not the numbers or words themselves:
- Set
full_boatsto how many boats are completely full. - Set
waitingto how many passengers are left over. - Set
bannerto"Ferry to ", thenisland, then"!", glued together with+.
With the starting values, the output should be:
Ferry to Moonwell!
Full boats: 3
Still waiting: 5Use the variables, not the numbers or words themselves:
- Set
full_boatsto how many boats are completely full. - Set
waitingto how many passengers are left over. - Set
bannerto"Ferry to ", thenisland, then"!", glued together with+.
With the starting values, the output should be:
Ferry to Moonwell!
Full boats: 3
Still waiting: 5main.py Python sleeping
Press Run to try your code, then Check to test it.