Results for “warning”

Showing 1–10 of 14

  1. Challenge

    Count warnings

    …mission log: how many entries, and how many of them are warnings. A sudden jump in warnings is often the first sign that something is going wrong. Count them, make sure the count can't be fooled, then…

    Write the code Medium 3 stages strings count multi-line strings logs
  2. Challenge

    Logging instead of print

    …for its level: logging.debug() , logging.info() , logging.warning() or logging.error() , and drop the level from the text, since the format adds it. With the level set to INFO , the debug lines…

    Fix the code Medium 2 stages logging debug info warning
  3. Article Mini projects

    Medical dispenser - Don’t trust the user

    …or secure key storage secret = os.urandom(32) print("Warning: Using randomly generated secret. Set MEDICATION_DISPENSER_SECRET environment variable for production.") return secret def…

  4. Challenge

    Clear error messages

    fuel_needed() quietly returns negative fuel for a negative burn length. Make it raise ValueError with a message that shows the bad value, then raise TypeError, checked first, when the length isn't a…

    Write the code Medium 2 stages errors raise ValueError TypeError
  5. Challenge

    Names with values

    …the three lengths are equal, and if they aren't, print a warning first: Warning: 4 sensors, 3 readings, 4 units ENG-1: 398.0 C ENG-2: 412.5 C TANK-1: 78.3 % len(sensors) == len(readings) == len(units)…

    Write the code Easy 2 stages for loop zip lists unpacking