Results for “end”

Showing 61–70 of 75

  1. Challenge

    Flatten nested ifs

    …reports the first one it finds; GO goes in the else at the end: Docking: HOLD, closing speed too high Docking: HOLD, misaligned Docking: HOLD, latches not ready Docking: GO Check the speed first, then…

    Fix the code Medium 2 stages if elif and nested conditions
  2. Challenge

    Validate a command

    …then compare it in an if / elif chain, with else at the end. Helpful errors Make the errors helpful. For an empty answer, ask for a command; for an unknown one, repeat what was typed, without the…

    Write the code Easy 2 stages if elif else input
  3. Challenge

    Count warnings

    At the end of each orbit, the flight director reads a summary of the mission log: how many entries, and how many of them are warnings. A sudden jump in warnings is often the first sign that something…

    Write the code Medium 3 stages strings count multi-line strings logs
  4. Challenge

    Search the log

    …plus its length, plus one for the space, and leave the end out. The time in brackets can grow longer, [T+100:02:00] , so work from position , not from a fixed number.

    Write the code Medium 2 stages strings in find slicing
  5. Challenge

    Signal delay

    …formatter". The order matters: round the seconds at the end instead, and a delay of 779.7 seconds turns into "12 min 60 s". Round trip A command can't be confirmed until the reply comes back, so…

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

    Round or cut?

    …Most of the time they agree. When they don't, a crate can end up a kilogram lighter on paper than on the scales. Predict where they differ, investigate a rule that surprises most programmers, then…

    Write the code Medium 3 stages int round rounding type conversion
  7. Article Mini projects

    Calculating Escape Velocity in Python

    …The displayed number might not show exact zeros at the end due to floating-point precision, but NumPy's float64 provides excellent accuracy for our calculations. Breaking Down the Problem into Steps…

  8. Challenge

    Retry the uplink

    …each attempt, stop at the first "ok" , then say how it ended: Attempt 1: timeout Attempt 2: no carrier Attempt 3: ok Uplink sent on attempt 3 When all three fail, the last line is Uplink failed after…

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

    Sign-up cleanup

    …name.split() splits on any run of spaces and drops the ends, so " ".join(...) rebuilds it neatly; title() capitalises each word. Reject and deduplicate Build the crew list. Reject a sign-up with no…

    Write the code Medium 2 stages project strings strip split
  10. Challenge

    Shift rota

    …an hour every Sunday, and twice this month somebody ended up working a night shift straight after an afternoon. Let the program build the rota, and check its own work. In turn Build rota , a list of…

    Write the code Hard 2 stages project scheduling lists tuples