Results for “for”

Showing 41–50 of 136

  1. Challenge

    Unreachable branch

    A vibration check reports WARN for a reading of 63 because its elif conditions are in the wrong order, so CRITICAL can never run. Predict it, find the dead branch, fix the order, then write a…

    Fix the code Easy 3 stages if elif order of conditions debugging
  2. Challenge

    Telemetry from CSV

    …read it with csv.DictReader, using the header row for the field names, then find the hottest temperature reading, comparing the values as numbers.

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

    Clear error messages

    fuel_needed() quietly returns negative fuel for a negative burn length. Make it raise ValueError with a message that shows the bad value, then raise TypeError, checked first, when the length isn't a…

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

    Safe mode

    …when the battery is under 20% or contact has been lost for over 10 minutes, using or, then name the rule that fired with boolean variables and an if/elif chain.

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

    Downlink time

    …in Mbit/s with input(), work out the transfer time without forgetting the 8 bits in a byte, show it in minutes and seconds, then count the ground station passes.

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