Results for “key”

Showing 51–60 of 62

  1. Article Mini projects

    Drawing Planetary Orbits in Python

    …ellipses. 2. Understanding Orbital Eccentricity One of the key characteristics of an orbit is its eccentricity. Orbital eccentricity is a measure of how much an orbit deviates from a perfect circle…

  2. Challenge

    Daily mission report

    …with csv.DictWriter : a header row with the four keys, then one row per subsystem. After the report, print an empty line, the saved line, and the file as it was written: Saved report.csv…

    Write the code Medium 2 stages project formatting f-strings alignment
  3. Challenge

    Command parser

    …was refused. Write the parser that sits between the keyboard and the spacecraft. burn, or a reason Write parse_command(text) . It ignores case and the spaces around words, returns ("burn", seconds)…

    Write the code Medium 2 stages project parsing strings split
  4. Challenge

    Telemetry from CSV

    …ENG-3: 98.6 C 09:30:15 TANK-1: 78.1 % Each row is a dict keyed by the header: row["sensor"] , row["value"] and so on. Leave the lines that write the file as they are. The hottest reading While you…

    Write the code Medium 2 stages csv csv.DictReader files open
  5. Challenge

    Safe number input

    …the burn length for the next manoeuvre. One morning the keyboard was set to a Polish layout, 12,5 went in instead of 12.5 , and the whole console program stopped with a ValueError . Make it ask again…

    Write the code Easy 2 stages errors try except ValueError
  6. Challenge

    Summary function

    …Write summarise(readings) , which returns a dict with the keys count , min , max and mean . Then print(summarise(pass_1)) prints: {'count': 5, 'min': 398.0, 'max': 455.2, 'mean': 419.5} Build the dict…

    Write the code Medium 2 stages functions return dictionaries min
  7. Challenge

    Entries per level

    …on debug logging, and the starter code now stops with KeyError: 'DEBUG' . Count any level that turns up, and print the levels in alphabetical order, so the report looks the same whatever order they…

    Write the code Easy 2 stages dictionaries counting get sorted
  8. Challenge

    Index by ID

    …index; an ID that isn't in it gets a message instead of a KeyError : CG-0044 | Freeze-dried meals | food | 42.0 kg CG-0099: not on the manifest CG-0042 | Water filter cartridges | life support | 18.5…

    Write the code Medium 2 stages dictionaries indexing lookup in
  9. Challenge

    Fuel for a burn

    …will cost. Write that tool: read the burn length from the keyboard, work out the fuel it uses, then what's left in the tank. Fuel used The main engine uses 7.5 kg of propellant every second. Read the…

    Write the code Easy 2 stages input float type conversion multiplication