Results for “lists”

Showing 61–70 of 92

  1. Challenge

    Sign-up cleanup

    …two weeks in a sealed habitat, has closed, and the list is a mess: names in capitals or with double spaces, emails with stray spaces, people who signed up twice, an entry with no name at all. Clean it…

    Write the code Medium 2 stages project strings strip split
  2. Article Mini projects

    Managing Astronaut Medical Data with Python

    …def load_astronauts(self): pass # We'll reload astronauts list here def view_astronauts(self): pass # We'll view a list of astronauts list here def setup_medical_tab(self): pass # We'll add medical…

  3. Challenge

    Config loader

    …that fills in what is missing, checks what is there, and lists every problem before anything starts. Defaults first Load settings_text with json.loads() . Start config as a copy of DEFAULTS , fill in…

    Write the code Hard 3 stages project json configuration validation
  4. Challenge

    Sort by a field

    …launches in whatever order it likes, and the warehouse lists cargo in the order it was packed. The launch board needs dates in order, and the loading crew wants the heaviest items first, because they…

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

    Parse a telemetry line

    …C line.split(",") cuts the text at every comma and gives a list of the pieces. You pick a piece by its index, the same way as a character in a string: fields[0] is the first. Lists get a stage of…

    Write the code Easy 2 stages strings split parsing csv
  6. Article Python Fundamentals

    Python If/Else for Beginners

    …evaluates the value directly: payloads_ready = [] # empty list is falsy if payloads_ready: print("Start deployment.") else: print("No payloads — skip deployment.") Empty lists, empty strings, zero…

  7. Challenge

    Packing crates

    …with 12 slots each. The loading crew needs a packing list: how many crates, and how full the last one is. Start with the crates the tubes fill completely, then work out the full packing list. Full…

    Write the code Medium 2 stages floor division modulo rounding up //
  8. Challenge

    Silent branch

    …for Scrub, and grey for any other status. The board now lists TBD too, and must print: Go: green Hold: amber Scrub: red TBD: grey Make: Battery state Write battery_state(percent) : full from 80% up…

    Fix the code Easy 3 stages functions return None branches