Challenge
Missing reading
…into the else , indented by four more spaces. Don't use if not temperature_c : 0 °C is a real reading. An empty field Readings now come from the telemetry feed, and a missing value shows up as an…
Showing 11–20 of 63
Challenge
…into the else , indented by four more spaces. Don't use if not temperature_c : 0 °C is a real reading. An empty field Readings now come from the telemetry feed, and a missing value shows up as an…
Challenge
A vibration check reports WARN for a reading of 63 because its elif conditions are in the wrong order, so CRITICAL can never run. Predict it, find the dead branch, fix the order, then write a…
Challenge
Print only the launches whose status is Go from a list of launch dicts, then collect the others with their status into one "not go yet" line, or none.
Challenge
…Expect the ValueError Write a check that passes only if fuel_needed(-5) raises ValueError : call it in try , set a variable to True in except ValueError: , and assert it after. Then print: All checks…
Challenge
Rewrite the four nested ifs in can_dock() as guard clauses that return a reason as soon as a check fails, keeping every answer the same, then add a new docking rule as one more guard with a default…
Challenge
…list Strip the spaces and make it upper case, then use if with in . For " pl-117 " it prints the first line.
Challenge
Replace a nine-branch elif that maps planets and the Moon to surface gravity with a dict and one get() lookup, keeping the output exactly the same, then loop over the dict for a weight table.
Challenge
Print a pre-flight checklist numbered from 1 with enumerate(list, start=1), then tick off the items the crew has already done with [x] and leave the rest as [ ].
Challenge
…0.0-450.0 Look at the decision line it prints after that. If it seems wrong to you, you are right: that is the fifth bug, for stage 2. This stage checks the lines above. Make it right ENG-2 is over…
Challenge
…whoever changes the pipeline next must find out at once if something broke. Write them. The hidden tests plant three bugs, one at a time, and your tests must catch every one. Test parse_row() Write…