runtime
50 / 500
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 linelog = "OOLOOOLLO". Check runs your program again with other logs
PrintsOn time: 6, Late: 3, then Longest on-time run: 3
Rulean empty log has 0 of everything
Expected output3 lines
  1. 1On time: 6
  2. 2Late: 3
  3. 3Longest on-time run: 3

Loading your progress…

Summarise a delivery log — Python practice · Runtime