Challenge
Seeded simulation
…a 5% chance of a glitch, and seed random with 42 so the count is the same on every run and a test can check it exactly, then pick a kind for each glitch with random.choice().
Showing 11–20 of 48
Challenge
…a 5% chance of a glitch, and seed random with 42 so the count is the same on every run and a test can check it exactly, then pick a kind for each glitch with random.choice().
Challenge
…next reading, so it never ends. Predict it, find the stuck counter, fix it, then write a wait that gives up when the readings run out.
Challenge
…lines with too few fields instead of crashing, with a count of parsed and damaged lines.
Challenge
…stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too and print each error.
Challenge
A crew count read with input() crashes when 1 is added to it. Predict the crash, find out what input() really returns, fix it with int(), then write a packing tool that reads two numbers.
Challenge
…readings and shows the latest one on screen. The developer counted five readings, wrote readings[5] , and the monitor crashes every time it starts. Predict what happens, find out which indexes exist…
Challenge
…then find the longest stretch with no station in contact, counting overlapping passes only once.
Challenge
…taking the crew in turn. Print one line per day, then count how many times one person works two shifts in a row: Mon Morning: Kowalska Afternoon: Tanaka Night: Okafor Tue Morning: Bondarenko…
Challenge
…pressure: <class 'float'> valve_open: <class 'str'> sample_count: <class 'int'> Make: Convert a packet Everything in this packet from the navigation computer arrived as text. Convert each value to the…
Challenge
…to print what was added and what was removed, then count what stayed with an intersection and print none for an empty change.