Challenge
Mission Control online
Print status lines that a monitoring system reads character by character. A first Python challenge on exact output with print(), right in your browser.
Showing 31–40 of 44
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
Write assert checks for parse_line() from "Parser function": the whole record for a good line first, then None for a blank line, a comment and a line with a missing field, so a broken parser can't…
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
…cleared for loading PL-999: not on the approved list Strip the spaces and make it upper case, then use if with in . For " pl-117 " it prints the first line.
Challenge
…Check the field before converting it: ENG-2: NO DATA Strip the field first, so a field with only a space counts as empty too, then compare it with "" . Convert with float() only in the else .
Challenge
…-> images/ Keep two versions of the name: one stripped for showing, one stripped and lower-case for checking.
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
…find it. A docstring Add a docstring to fuel_needed() : a string in triple quotes as the first line inside the function, saying what it returns and what the reserve means. The output doesn't change…
Challenge
…Someone passed confirm="yes" , and since a non-empty string is true, the abort ran. Accept only True itself, and add the call that tried: ABORT: Cabin pressure falling Abort refused: pass confirm=True…
Challenge
…its key in square brackets: launch["name"] . Inside an f-string, use single quotes for the key: {launch['name']} . Everything in the response Before relying on an API, developers look at a whole…