Results for “and”

Showing 11–20 of 150

  1. Challenge

    Decimal comma

    An operator types 42,5 and float() crashes with a ValueError. Predict it, find out why, accept both commas and dots with replace(), then read pressures written like 1 013,25.

    Fix the code Easy 3 stages strings replace float ValueError
  2. Challenge

    Config loader

    …over a copy of the defaults, check each value's type and range and report every problem in one go, then wrap it all in a load_config() that never crashes, even on broken JSON.

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

    File name from data

    Build eng-2_2026-03-14.csv from a sensor ID and a date, then turn a name like Star Tracker A into a safe file name, and put the file in a folder of its own.

    Write the code Easy 3 stages strings f-strings lower replace
  4. Challenge

    Magic numbers

    Turn the bare 9.81 and 1000 in a weight report into named constants without changing the output, then write a Mars version with constants from the start.

    Fix the code Easy 3 stages constants refactoring variables clean code
  5. 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
  6. Challenge

    Command parser

    …commands such as burn 12.5 or set mode safe into tuples and raises ValueError with a reason for anything malformed, then run a whole batch of commands and report each one.

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

    Mission elapsed time

    Parse the launch and the latest telemetry timestamp with datetime.fromisoformat(), subtract them to get the mission elapsed time, then time events reported by ground stations in three different time…

    Write the code Medium 2 stages datetime timedelta ISO 8601 time zones
  8. Challenge

    Launch counter crash

    record_launch() adds 1 to a global counter and stops with an UnboundLocalError. Predict it, find out why Python treats the name as local, fix it by passing the count in and returning the new one, then…

    Fix the code Medium 3 stages functions scope UnboundLocalError global