Challenge
Parse a telemetry line
…as a character in a string: fields[0] is the first. Lists get a stage of their own later. The value as a number split() gives text, so "412.5" + 273.15 would stop with a TypeError . Turn the value…
Showing 21–30 of 32
Challenge
…as a character in a string: fields[0] is the first. Lists get a stage of their own later. The value as a number split() gives text, so "412.5" + 273.15 would stop with a TypeError . Turn the value…
Challenge
…tab. That's exactly what happened to \new and \telemetry . Get the paths to print the way Windows writes them. Raw string Run the script and look at the output: the path is split across two lines…
Challenge
…line runs. That's a SyntaxError . Find what's missing and get the boot script running again. Missing quote Run the boot script. Instead of booting, it stops with an error: one line is missing its…
Challenge
…Check for impossible values first; only a valid longitude gets converted and gets a station.
Challenge
…the fuel budget came out 62.5 kg short. A function that gets a value it can't work with should say so, loudly and clearly, at the moment it happens. Raise ValueError Make fuel_needed() raise…
Challenge
…come from, fix the default, then write a function that gets it right from the start. Predict and run Don't run the code yet. Read it and decide what it will print on its first line. Write your guess…
Challenge
…one number at a time: after each pass the ground station gets a whole list of readings, and every one of them needs the same check. Run the check over the whole list, then add a summary the flight…
Challenge
After every pass over the ground station, the engine team gets a summary of the temperature readings: the lowest, the highest and the average. Nobody reads five hundred numbers; everybody reads the…
Challenge
…but the sign-up order matters too: it decides who gets the first training slots. The same list has to be shown both ways. Make a sorted copy for the report and leave the original alone, then make the…
Challenge
The ground station no longer gets one reading at a time: the feed now delivers a block of lines every second. The flight controllers want them as a report they can scan at a glance, not as raw…