Challenge
Wrong line commented out
A real check is commented out and a debug line is left on. Use # comments to put the pre-flight checklist script back in order. A beginner Python challenge on comments.
10 results
Challenge
A real check is commented out and a debug line is left on. Use # comments to put the pre-flight checklist script back in order. A beginner Python challenge on comments.
Challenge
Extend the feed parser so continue skips blank lines and comment lines, then report damaged lines with too few fields instead of crashing, with a count of parsed and damaged lines.
Challenge
Extend the feed parser from "Skip blanks and comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too…
Challenge
…the record dict, then let it return None for blank, comment and damaged lines so the loop only keeps real records.
Challenge
The parser from "Skip blanks and comments" prints each reading and forgets it. The rest of the ground software needs the readings themselves: the alert check, the charts, the daily report. Each one…
Challenge
…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 pass.
Challenge
…in last_index . Check them with the prints in the comments, and remove those lines before you check. Modify. Fix the slice so it takes the four digits after the dash. It must print: Container number…
Challenge
…rover test drive in variables with the names given in the comments, each with the right type, then print them one per line: Rover: Pathfinder-2 Wheels: 6 Battery: 3.6 kWh Autonomous: False
Challenge
…type it should have, into the new variables named in the comments, then print each new value and its type: altitude_km: 408 <class 'int'> speed_kms: 7.66 <class 'float'> crew: 3 <class 'int'>
Challenge
…the launch arrived as a ready-made Python dict, with a comment saying the JSON had already been turned into one. That was a shortcut. A real API sends text, and the first thing any program does with…