Challenge
Read the traceback
…from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
Showing 11–20 of 32
Challenge
…from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
Challenge
Go through the mission log and build a new list holding only the WARN and ERROR entries with append(), then let a minimum level decide what counts, the way logging tools filter by severity.
Challenge
…and string repetition, then find a code inside a log line and mask it there before the line is saved.
Challenge
…and leaving the global fuel unchanged. Predict the last line, compare both values, fix it by returning the total, then write a function that uses only its parameters.
Challenge
Print the commander, the newest member and the crew size from a list with [0], [-1] and len(), then add the second in command and the whole roster joined into one line.
Challenge
…log entries to mission.log with with open(), one per line, read the file back and print it, then add an append_entry() function that adds lines at the end without wiping what is there.
Challenge
Choose New Norcia, Cebreros or Malargüe from the longitude under a spacecraft with an if/elif chain of ranges, then accept longitudes from 0 to 360 and reject values that can't be longitudes.
Challenge
…for the shift handover, with aligned columns and a totals line, then save the same data as a CSV file with csv.DictWriter for the spreadsheet people.
Challenge
An oxygen check uses = instead of == and has a line that isn't indented, so Python refuses to run it. Predict what happens, fix both errors one after the other, then write an if/else check yourself.
Challenge
…as local, fix it by passing the count in and returning the new one, then write a fuel function the same way.