Results for “and”

Showing 71–80 of 233

  1. Challenge

    Accept the right files

    Check whether a path starts with telemetry/ and ends with .csv using startswith() and endswith(), see why in isn't enough, then clean up paths with Windows backslashes, capitals and spaces first.

    Write the code Easy 2 stages strings startswith endswith paths
  2. 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 // %
  3. Challenge

    Waypoint distance

    …distance between two waypoints on a rover map with ** 2 and ** 0.5, then add a third waypoint and print each leg and the length of the whole route.

    Write the code Easy 2 stages exponent square root ** Pythagoras
  4. Challenge

    Running totals

    Predict how -= and += change a fuel level, track it through three burns and a top-up, then follow a battery through one orbit. A PRIMM challenge on updating variables.

    Write the code Easy 3 stages variables -= += updating values
  5. Challenge

    Round or cut?

    int() cuts the decimals off, round() rounds, and round(2.5) gives 2. Predict the difference, investigate Python's rounding rule, then round a fuel reading two ways.

    Write the code Medium 3 stages int round rounding type conversion
  6. Article Mini projects

    Medical dispenser - Don’t trust the user

    Remember that scene in Project Hail Mary [spoiler alert] by Andy Weir where Dr. Ryland Grace outsmarts the ship's computer? He's in pain, asks for painkillers, and the computer refuses because he…