Results for “files”

Showing 1–10 of 29

  1. Challenge

    Accept the right files

    The upload tool sends telemetry files to the mission archive, but only CSV files from the telemetry/ folder belong there. Last week someone uploaded a photo and a backup file, and the archive's import…

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

    Log to a file

    …to mission.log with with open(), one per line, read the file back and print it, then add an append_entry() function that adds lines at the end without wiping what is there.

    Write the code Easy 2 stages files open with write
  3. Challenge

    Upload router

    Route an uploaded file to images, telemetry or rejected by its extension with an if/elif chain and endswith(), then cope with capitals, spaces and more extensions without changing the name that is…

    Write the code Easy 2 stages if elif else or
  4. Challenge

    Telemetry from CSV

    …a header row, and it changes every few seconds. Read the file itself, with the module made for it, then pick out the hottest reading. csv.DictReader Replace the old parser and its feed string: open…

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

    Telemetry pipeline

    …whose value is not a number, with its line number in the file: the header is line 1, so the first reading is line 2. Keep every other row in readings , as a dict with time ( "HH:MM:SS" ), sensor and…

    Write the code Hard 3 stages project csv json files
  6. Article Mini projects

    Medical dispenser - Don’t trust the user

    …or generates securely """ def __init__(self, log_file="medication_log.json"): self.log_file = Path(log_file) self.minimum_interval_seconds = 3 * 3600 self.max_daily_doses = 6 # Load or generate secure…

  7. Challenge

    JSON out

    …station's Polish letters readable and sort the keys so the files compare easily.

    Write the code Easy 2 stages json json.dumps modules import
  8. Challenge

    Downlink time

    Read a file size in MB and a link speed in Mbit/s with input(), work out the transfer time without forgetting the 8 bits in a byte, show it in minutes and seconds, then count the ground station…

    Write the code Medium 3 stages input float bits and bytes round