Results for “mean”

Showing 11–20 of 24

  1. Challenge

    Magic numbers

    …: they work, but nobody reading the code knows what they mean, and changing one means finding every copy. Predict what the report prints, find out where the magic numbers hide, then give them names…

    Fix the code Easy 3 stages constants refactoring variables clean code
  2. Challenge

    Launch commit criteria

    …nearby, 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…

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

    Units and separators

    …curly braces, add a format spec after a colon: {speed:.2f} means "a number with 2 digits after the decimal point". Mass Add the mass, with commas between groups of three digits: Speed: 7.66 km/s Mass…

    Write the code Easy 3 stages f-strings number formatting rounding telemetry
  4. Challenge

    Flight software review

    …the program says GO. Fix the decision, so that any problem means NO GO: Checked 4 sensors, last: CABIN ENG-2: 455.0 outside 0.0-450.0 Decision: NO GO The hidden tests also run the check with readings…

    Fix the code Hard 2 stages project debugging SyntaxError TypeError
  5. Challenge

    Confirm by name

    …True) , where nothing on the line says what that True means, and a careless copy and paste could abort a real mission. Make the confirmation impossible to give by accident. Keyword-only and required…

    Write the code Medium 2 stages functions keyword-only arguments * safety
  6. Challenge

    Lookup table

    …elif branches, one per body, and every new destination means another branch. Turn the chain into a table without changing a single character of the output, then use the table for something the chain…

    Fix the code Medium 2 stages dictionaries refactoring lookup tables get
  7. Challenge

    Copy-pasted blocks

    …every change has to be made three times, and the next tank means a fourth copy. Turn the copies into one loop without changing a single character of the output, then see how cheap the next tank…

    Fix the code Medium 2 stages refactoring for loop tuples lists
  8. Challenge

    Ground station pick

    …longitudes from 0 to 360 instead of from -180 to 180: 296 means 64 degrees west. The starter code picks New Norcia for 296, which is wrong. Before choosing, turn anything over 180 into the usual form…

    Write the code Easy 2 stages if elif else ranges
  9. Challenge

    Sensor ID parts

    …rsplit("-", 1) splits from the right, and the 1 means "at most once". IDs like ENG-2 must still work.

    Write the code Medium 2 stages strings split rsplit int