Results for “types”

Showing 21–30 of 40

  1. Challenge

    Live T-minus

    …time and datetime.now(timezone.utc) instead of a number typed by hand, then turn it into a countdown() that counts up with T+ after launch.

    Write the code Medium 2 stages datetime datetime.now timezone countdown
  2. Challenge

    Manifest validator

    The logistics team typed the manifest for the next supply flight by hand, and the loading crew won't touch a crate until every line checks out. Last time, a typo in a mass sent a 61 kg battery pack to…

    Write the code Medium 2 stages project validation dictionaries functions
  3. Challenge

    Catch what you expect

    …Change except: to except Exception as error: and print type(error).__name__ in it, to see what is really being caught. Store its name in hidden_error , and the number of readings that are really bad…

    Fix the code Medium 3 stages errors try except ValueError
  4. Challenge

    Sign-up cleanup

    Clean the crew sign-ups for the analogue mission: trim and capitalise names, lower-case emails, then reject sign-ups with no name or a broken email and drop duplicates by email, saying why for each…

    Write the code Medium 2 stages project strings strip split
  5. Challenge

    Telemetry from CSV

    Point the feed parser from "Parse the whole feed" at telemetry.csv: read it with csv.DictReader, using the header row for the field names, then find the hottest temperature reading, comparing the…

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

    Missing reading

    …of a number, and the check from "Alert level" stops with a TypeError in the middle of a pass. Extend your check so a missing reading is reported, not crashed on, then handle missing values in the…

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

    Accept the right files

    …before it's accepted, then make the checks work for paths typed on a Windows PC. Check the ends Print whether the path starts with telemetry/ and whether it ends with .csv : In telemetry/: True CSV…

    Write the code Easy 2 stages strings startswith endswith paths
  8. Challenge

    Undo and history

    …and last week a crate was removed by mistake and had to be typed back in from memory. Extend the console with a history of changes, then an undo that uses it. A history of changes The console works as…

    Write the code Hard 2 stages project lists stack append
  9. Challenge

    Real JSON

    …but response_text is text, and the program stops with TypeError: string indices must be integers . Turn the text into a dict with json.loads() , then add a line for crewed : Launch: Lumen-3 Provider…

    Write the code Easy 2 stages json json.loads modules import