Results for “ValueError”

Showing 11–16 of 16

  1. Challenge

    Telemetry pipeline

    A small but complete data pipeline: read the telemetry CSV, reject rows with unknown sensors or broken values and say why, flag readings outside each sensor's limits, and save a JSON summary for the…

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

    Summary function

    …mean The second pass had no data, and min([]) stops with a ValueError . For an empty list, return a count of 0 and None for the other three. Round the mean to one decimal place, too. Print both…

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

    Skip blanks and comments

    …The parser from "Parse the whole feed" stops with a ValueError on the first comment line. Skip blank lines and comment lines, so it prints only the readings: 09:30:05 ENG-2: 412.5 C 09:30:05 TANK-1…

    Write the code Medium 2 stages for loop continue strip startswith
  4. Challenge

    Missing reading

    …them. The starter code parses the line and stops with a ValueError , because float("") makes no sense. Check the field before converting it: ENG-2: NO DATA Strip the field first, so a field with only…

    Write the code Medium 2 stages if else None is None
  5. Challenge

    Sensor ID parts

    …their name: LIFE-SUPPORT-4 . The starter code stops with a ValueError , because split("-") cuts at every dash and int("SUPPORT") makes no sense. Split only at the last dash, so it prints: Subsystem…

    Write the code Medium 2 stages strings split rsplit int
  6. Challenge

    JSON-looking payload

    …code uses an f-string. Run it: Python stops with a strange ValueError about a format specifier. In an f-string, every { starts a placeholder, including the one meant to open the message. Fix the line…

    Fix the code Medium 2 stages quotes escape sequences f-strings json