Results for “new line”

Showing 21–30 of 32

  1. Challenge

    Shared default list

    …sample already in it, and by the end of the week every new log held every sample ever taken. Predict what the program prints, find out where the old samples come from, fix the default, then write a…

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

    What arrived?

    …yet. Read it and decide what it will print on its first line. Write your guess in prediction , at the top, between the quotes. Then run it and compare. Any guess passes this stage: the point is to…

    Write the code Easy 3 stages type() data types type conversion sensor data
  3. Challenge

    Telemetry pipeline

    …"Telemetry from CSV", the error handling from "Survive bad lines", the limits from the alert checks and the JSON from "JSON out". The ground station's export arrives every few seconds. Your program…

    Write the code Hard 3 stages project csv json files
  4. Challenge

    Telemetry from CSV

    The feed parser from "Parse the whole feed" still reads two lines somebody pasted into the program. The ground station now delivers a proper export, telemetry.csv , with a header row, and it changes…

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

    Counter

    …works: a dict, and counts.get(level, 0) + 1 to start each new level at 0. That pattern comes up so often that Python has a whole class for it. Swap it in, then use the one thing a plain dict can't do…

    Fix the code Easy 2 stages collections Counter most_common dictionaries
  6. Challenge

    Running totals

    …keeps one variable up to date instead of creating a new one for each step. Predict how -= and += change a value, follow the fuel through a whole sequence, then track a battery yourself. Predict and…

    Write the code Easy 3 stages variables -= += updating values
  7. Challenge

    Magic numbers

    …yet. Read it and decide what it will print on its first line. Write your guess in prediction , at the top, between the quotes. Then run it and compare. Any guess passes this stage: the point is to…

    Fix the code Easy 3 stages constants refactoring variables clean code
  8. Challenge

    Lookup table

    …in a chain of nine elif branches, one per body, and every new destination means another branch. Turn the chain into a table without changing a single character of the output, then use the table for…

    Fix the code Medium 2 stages dictionaries refactoring lookup tables get
  9. Challenge

    Sorted copy

    …Kowalska, Lindqvist, Moreau sorted(signups) gives a new, sorted list and doesn't touch signups . ", ".join(...) turns each list into one line. Small letters Two new crew members have names that start…

    Write the code Easy 2 stages lists sorted sort key