Results for “count”

Showing 41–48 of 48

  1. Challenge

    Units and separators

    …mass as 1234567 , and nobody on the flight deck wants to count digits during a launch. Format the numbers for people: a sensible number of decimal places, thousands separators and the right units. The…

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

    Mission elapsed time

    …wants the mission elapsed time: how long since launch. Counting days and hours by hand across month ends goes wrong eventually, and the ground stations don't even agree on a time zone. Let the…

    Write the code Medium 2 stages datetime timedelta ISO 8601 time zones
  3. Challenge

    Crew roster

    …is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who is second in the list, and the whole roster on one line: Commander: Okafor…

    Write the code Easy 2 stages lists indexing negative index len
  4. Challenge

    Last five readings

    …first, so the most recent are at the end. A negative start counts from the end, as with strings. The window moves A new reading has arrived. Add new_reading = 772 under the list, append it to the…

    Write the code Easy 2 stages lists slicing negative slice append
  5. Challenge

    Missing reading

    …DATA Strip the field first, so a field with only a space counts as empty too, then compare it with "" . Convert with float() only in the else .

    Write the code Medium 2 stages if else None is None
  6. Challenge

    Packing crates

    …tubes are left over: Full crates: 8 Tubes left over: 4 // counts how many times 12 fits into 100, and % gives what's left. Packing list The tubes left over still need a crate, so the packing list…

    Write the code Medium 2 stages floor division modulo rounding up //