Results for “print”

Showing 141–150 of 237

  1. Challenge

    Command parser

    …the reason for anything else. Then try every command and print OK and the result, or REJECTED , the command in quotes and the reason: OK ('burn', 12.5) OK ('burn', 3.0) OK ('burn', 0.5) REJECTED…

    Write the code Medium 2 stages project parsing strings split
  2. Challenge

    Seeded simulation

    …readings, count a glitch when random.random() < 0.05 , and print the count: Glitches in 100 readings: 7 Call random.random() exactly once per reading, after the seed: the check expects that exact…

    Write the code Easy 2 stages random random.seed random.choice simulation
  3. Challenge

    Telemetry from CSV

    …with newline="" , loop over csv.DictReader(csv_file) , and print each row in the same format as before: 09:30:05 ENG-2: 412.5 C 09:30:05 TANK-1: 78.3 % 09:30:10 CABIN: 101.2 kPa 09:30:10 ENG-2: 415.0…

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

    Any number of values

    …loose values, then with the readings list unpacked, and print: Three spot checks: 401.0 The whole pass: 419.5 Inside the function, values is a tuple, so sum() and len() work on it. In the second call…

    Write the code Easy 2 stages functions *args unpacking keyword-only arguments
  5. Challenge

    Sort by a field

    …the racks. Sort both lists by one of their fields. By date Print the launches from the earliest date to the latest: 2026-11-05 Lumen-3 2026-11-21 Kestrel-7 2026-12-01 Tern-5 2027-01-18 Polaris Cargo 4…

    Write the code Easy 2 stages functions sorted key reverse
  6. Challenge

    Airlock permissions

    …the crew member holds every permission in needed . If not, print what is missing, sorted: Kowalska can't depressurise the airlock: missing eva_certified needed <= granted is True when every item of…

    Write the code Medium 2 stages sets subset difference permissions
  7. Challenge

    Mass by category

    …the mass of each category in a dict called totals , then print each category with its total, in the order the categories first appear: life support: 49.8 kg spares: 2.4 kg food: 67.0 kg crew: 3.4 kg…

    Write the code Medium 2 stages dictionaries grouping get sorted
  8. Challenge

    Filter the log

    …with only the WARN and ERROR entries, in log order. Then print how many there are, and each one: Alerts: 4 [T+00:12:05] WARN Battery 3 temperature high [T+00:14:47] ERROR Fuel valve 2 not responding…

    Write the code Medium 2 stages for loop lists append filtering
  9. Challenge

    Upload router

    …By extension Choose the folder by the file's extension and print where it goes: .png or .jpg images .csv telemetry anything else rejected For the camera image in the starter code: cam-1_2026-03-14.png…

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

    Accept the right files

    …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 file: True path.startswith("telemetry/") and…

    Write the code Easy 2 stages strings startswith endswith paths