Results for “mean”

Showing 21–30 of 33

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. Challenge

    CSV row

    …the columns, so anyone who opens it knows what each value means. Print the header above the reading: date,sensor,value,unit 2026-03-14,ENG-2,412.5,C Use a second print() with the four column names as…

    Write the code Easy 3 stages print sep csv telemetry
  7. Challenge

    JSON-looking payload

    …f-string, every { starts a placeholder, including the one meant to open the message. Fix the line so it prints the same message: {"status": "GO", "note": "Don't skip pre-check"} Write each curly brace…

    Fix the code Medium 2 stages quotes escape sequences f-strings json
  8. Challenge

    Log line format

    …5 , not 05 . Add a format spec after a colon: {seconds:02} means "at least 2 characters wide, filled with zeros".

    Write the code Easy 2 stages f-strings print logs formatting