Results for “modulo”

Showing 1–10 of 30

  1. Challenge

    Statistics module

    …tested, in its standard library. Use them instead. Use the module Delete the hand-written mean() and median() , add import statistics at the top, and print the same two lines with statistics.mean()…

    Fix the code Easy 2 stages statistics mean median stdev
  2. Article Mini projects

    Python Random Module

    …to create a random planet selector. Using Python's random module, you'll learn how to generate exciting space missions while mastering fundamental programming concepts.

  3. Challenge

    Shift rota

    Build the station's weekly shift rota: three shifts a day, the crew taken in turn so nobody works two shifts in a row, with a check that proves it, then plan around days off while keeping the work…

    Write the code Hard 2 stages project scheduling lists tuples
  4. Challenge

    Duration formatter

    Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.

    Write the code Easy 3 stages floor division modulo // %
  5. Challenge

    Packing crates

    Work out how many 12-slot crates 100 sample tubes fill with // and %, then how many crates they need and how full the last one is, including the case where the tubes fit exactly.

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

    Logging instead of print

    …tank, under lines nobody needs. Switch to the logging module, where every message has a level and you decide which levels to show. Levels instead of prints Replace each print() with the logging call…

    Fix the code Medium 2 stages logging debug info warning