question 50 Loops & Iteration · hard
Summarise a delivery log
A courier's week is logged one character per delivery: O for on time, L for late. Turn the log into a summary: how many were on time, how many were late, and the longest run of on-time deliveries in a row.
First line
log = "OOLOOOLLO". Check runs your program again with other logsPrints
On time: 6, Late: 3, then Longest on-time run: 3Rulean empty log has 0 of everything
Expected output3 lines
- 1On time: 6
- 2Late: 3
- 3Longest on-time run: 3