Results for “first program”

Showing 1–10 of 27

  1. Challenge

    Missing index

    …valid indexes with len(), fix it with [-1], then print the first, middle and last readings for any length.

    Fix the code Easy 3 stages lists indexing IndexError len
  2. Challenge

    Changed the caller's list

    …so the caller's stored readings change too. Predict the first line, prove both names share one list, fix it by returning a new list, then write a filter that leaves its input alone.

    Fix the code Medium 3 stages functions lists mutation return
  3. Challenge

    Survive bad lines

    …comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too and print each error.

    Write the code Medium 2 stages errors try except ValueError
  4. Challenge

    Telemetry from CSV

    …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 every few seconds. Read the file…

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

    Shared default list

    …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 function that gets it right from the start. Predict and…

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

    Strings don't change

    The inspection tool marks rejected crates by changing the first letter of their code from P to X . It looks like the simplest line in the whole program, and it crashes every time. Predict what…

    Fix the code Easy 3 stages strings immutability slicing TypeError
  7. Challenge

    Telemetry pipeline

    …ground station's export arrives every few seconds. Your program has to read it, refuse what it can't trust, raise the alarm on what is out of range and leave a summary the dashboard can read. Three…

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

    Launch counter crash

    …and a function that adds one to it. On launch day, the first launch stopped the program with an error nobody had seen before. Predict what happens, find out why, then fix it in a way that keeps the…

    Fix the code Medium 3 stages functions scope UnboundLocalError global
  9. Challenge

    Assignment in a condition

    …Look closely at the if line and at the line under it. This program never runs, and a program that doesn't run can't be checked. After you run it and read the error, put a # in front of each of the…

    Fix the code Easy 3 stages if else == SyntaxError