Challenge
Nested response
…the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.
5 results
Challenge
…the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.
Challenge
Refactor a docking check built from three nested ifs into one condition joined with and, keeping the output exactly the same, then rewrite it as a flat if/elif chain that reports the first check that…
Challenge
Scan a radar grid stored as 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…
Challenge
Build the station's weekly shift rota: three shifts a day, the crew taken in turn so nobody works two shifts in a row, with a check that proves it, then plan around days off while keeping the work…
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…