11/13
Part 4 of 4 · On your ownLearn and do
A question with only a signature
This time the editor holds the signature and a print line, nothing more. That's how the practice problems at the end of each lesson start. Make the five moves on your own:
Write
longest_streak(days):daysis a sorted list of different day numbers on which someone practiced. Return the length of the longest run of days in a row.longest_streak([1, 2, 3, 5, 6, 10])returns 3.
Say it back with an example of your own, write the checks first, then the plainest version that works. If you stall, say out loud what you'd do by hand with a pencil, and write that.
In the editor, write longest_streak(days).