Results for “write”

Showing 61–70 of 79

  1. Challenge

    Path in a config

    …and \telemetry . Get the paths to print the way Windows writes them. Raw string Run the script and look at the output: the path is split across two lines, with a strange gap in the middle. Fix the…

    Fix the code Easy 2 stages raw strings escape sequences paths print
  2. Challenge

    Clear error messages

    …print: 500.0 Refused: burn length can't be negative: -5 s Write raise ValueError(f"burn length can't be negative: {burn_s} s") inside an if , before the calculation. A burn of 0 seconds is allowed…

    Write the code Medium 2 stages errors raise ValueError TypeError
  3. Challenge

    Retry the uplink

    …times, so that a dead link doesn't block everything else. Write the retry loop against a simulator that plays back the radio's replies, then space the attempts out. Up to three tries Try up to…

    Write the code Medium 2 stages for loop range break retry
  4. Challenge

    Launch commit criteria

    …and range safety reports GO. One failed rule means HOLD. Write the GO/HOLD decision, then make it say which rules are holding the launch. GO or HOLD Clear the launch only if all three rules are met…

    Write the code Easy 2 stages if else and not
  5. Challenge

    Safe mode

    …solar panels at the Sun and waits for the ground to call. Write the rule that decides when to enter safe mode, then make it report which rule fired, so the team on the ground knows where to start…

    Write the code Medium 2 stages if elif or and
  6. Challenge

    Downlink time

    …long a download will take and how many passes it needs. Write their calculator: read the file size and the link speed, work out the transfer time, then plan it pass by pass. Transfer time File sizes…

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

    Duration formatter

    …count days as well. Mission control displays often write elapsed time as days, a slash, then the clock: DDD/HH:MM:SS . Add the days, with three digits: 001/03:46:40 A day has 86400 seconds. Once the…

    Write the code Easy 3 stages floor division modulo // %
  8. Challenge

    Fuel for a burn

    …how long the burn will be and shows what it will cost. Write that tool: read the burn length from the keyboard, work out the fuel it uses, then what's left in the tank. Fuel used The main engine uses…

    Write the code Easy 2 stages input float type conversion multiplication
  9. Challenge

    Signal delay

    …and seconds, then for the round trip. Python lets you write big numbers with underscores, like 225_000_000 , so you can read them at a glance. Delay in seconds Work out how long a radio signal takes…

    Write the code Medium 3 stages division round // %
  10. Challenge

    Aligned status board

    …HOLD Format specs work on any value, including text you write straight into the braces: {'SYSTEM':<12} . Use the other kind of quotes inside, so they don't end the f-string. Readings on the right The…

    Write the code Medium 3 stages f-strings alignment tables formatting