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…
9 results
Challenge
…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…
Challenge
…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…
Challenge
…setting good_text: Config OK: retries = 5, log_level = WARNING broken_text: not valid JSON: Expecting ',' delimiter
Challenge
…find the first ERROR, then rank the subsystems by how many warnings they raised.
Challenge
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…
Challenge
…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)…
Challenge
…screen shows only the entries that need attention: warnings and errors. Build that filtered list from the log, then make the filter adjustable, as real logging tools do. Warnings and errors only Build…
Challenge
…how many entries of each level it had. A sudden jump in warnings says more than any single entry. Count the entries per level, then make the count survive a level nobody planned for. Three counters…
Challenge
…start=1) . Look for "] ERROR" , as in "Count warnings", so a message that only mentions the word doesn't count. break ends the loop. How far it looked Show how much of the log the search needed: count…