Challenge
Off-by-one slice
A slice meant to take the number from the container tag CG-0042 gives -004. Predict it, work out where indexes start and where a slice ends, fix it, then slice a sample label yourself.
Showing 21–30 of 38
Challenge
A slice meant to take the number from the container tag CG-0042 gives -004. Predict it, work out where indexes start and where a slice ends, fix it, then slice a sample label yourself.
Challenge
Extend the parser from "Parse a telemetry line" to read three readings from a multi-line feed, print each as one row, then turn them into a report with a header and aligned columns.
Challenge
An operator types 42,5 and float() crashes with a ValueError. Predict it, find out why, accept both commas and dots with replace(), then read pressures written like 1 013,25.
Challenge
Turn " Launch " into launch with strip() and lower(), check it against the command list, then accept underscores and dashes too, so commands match however operators type them.
Challenge
Split a sensor ID like ENG-2 into its subsystem and its unit number as an int, work out the next ID, then handle subsystems with a dash in their name using rsplit().
Challenge
Print status lines that a monitoring system reads character by character. A first Python challenge on exact output with print(), right in your browser.
Challenge
…place, then draw the crew display's ten-segment gauge with string repetition and int().
Challenge
…is text, and the program stops with TypeError: string indices must be integers . Turn the text into a dict with json.loads() , then add a line for crewed : Launch: Lumen-3 Provider: JAXA Status: Go…
Challenge
…csv.DictReader Replace the old parser and its feed string: open telemetry.csv with newline="" , loop over csv.DictReader(csv_file) , and print each row in the same format as before: 09:30:05 ENG-2…
Challenge
…member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who…