Results for “count”

Showing 61–70 of 76

  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. Article Mini projects

    Medical dispenser - Don’t trust the user

    …stopwatch that starts when the program runs and just keeps counting up, immune to Grace's shenanigans. Important limitation: Monotonic time is only reliable within a single program session. It resets…

  4. Article Mini projects

    Converting Temperatures in Python

    …yellow, white, to blue. At first glance, this may seem counterintuitive, but temperatures closer to red are cooler, while those closer to blue are hotter. In everyday life, we encounter this scale…

  5. 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
  6. 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
  7. 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