Results for “get”

Showing 21–30 of 32

  1. 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…

    Write the code Easy 2 stages strings split parsing csv
  2. Challenge

    Path in a config

    …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…

    Fix the code Easy 2 stages raw strings escape sequences paths print
  3. Challenge

    Broken boot script

    …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…

    Fix the code Easy 3 stages SyntaxError debugging print quotes
  4. Challenge

    Ground station pick

    …Check for impossible values first; only a valid longitude gets converted and gets a station.

    Write the code Easy 2 stages if elif else ranges
  5. Challenge

    Clear error messages

    …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…

    Write the code Medium 2 stages errors raise ValueError TypeError
  6. Challenge

    Shared default list

    …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…

    Fix the code Medium 3 stages functions default values mutable defaults None
  7. Challenge

    Check every reading

    …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…

    Write the code Easy 2 stages for loop lists if elif
  8. Challenge

    Readings summary

    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…

    Write the code Easy 2 stages lists min max sum
  9. Challenge

    Sorted copy

    …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…

    Write the code Easy 2 stages lists sorted sort key
  10. Challenge

    Telemetry report

    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…

    Write the code Medium 2 stages strings split slicing f-strings