Challenge
Validate a cargo record
…of everything wrong with a cargo record: missing fields and a negative mass, then a cargo ID that doesn't match the CG- and four digits format. An empty list means the record is fine.
Showing 41–50 of 150
Challenge
…of everything wrong with a cargo record: missing fields and a negative mass, then a cargo ID that doesn't match the CG- and four digits format. An empty list means the record is fine.
Challenge
…yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for any missing field.
Challenge
…a list of strings with a loop inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way through.
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
…first ERROR entry, print its line number with enumerate() and stop there with break, then report how many lines were checked, or that there were no errors at all.
Challenge
Summarise a list of engine readings with min(), max() and a mean from sum() / len(), then add the spread and make the summary cope with an empty list instead of crashing.
Challenge
…in place, then sort readings from highest to lowest and keep the top three.
Challenge
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.
Challenge
…can't be changed. Predict the crash, find out what methods and slices really give, build a new string instead, then swap a letter in the middle of a code.
Challenge
…print each with a label, then turn the value into a number and convert it to kelvin.