Challenge
Nested response
…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.
Showing 21–30 of 41
Challenge
…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
The flight log script won't run. Read the error message, go straight to the line it names and fix it. Learn to debug Python syntax errors the way programmers do.
Example
Sets store only unique elements without a specific order.
Quiz
…on conditions, comparison and logical operators and indentation, with instant answers.
Article Python Fundamentals
…most common syntax error in this whole topic. Everything indented under the def line is the body of the function. Python uses that indentation (four spaces is the convention) to work out where the…
Challenge
…adds at the end, crew.insert(1, x) puts x at index 1, and crew.remove(x) deletes it. Use the variables, not the names. Reassigned After the changes, the newest member, now last in the list, is…
Challenge
…line.find(" ", start) searches for a space starting at index start , so it finds the space after the code, not the first one in the line. Then line.replace(code, masked) builds the new line.
Challenge
…and gives a list of the pieces. You pick a piece by its index, the same way as a character in a string: fields[0] is the first. Lists get a stage of their own later. The value as a number split()…
Article Python Fundamentals
…orbit insertion burn.") If fuel_percent > 50 is True , the indented block runs. If it's False , Python skips the block entirely. else — the fallback plan Use else to run code when the if condition is…
Challenge
…row, and print its row and column, both counted from 0, as indexes are. Then print how many there are: Debris at row 0, column 2 Debris at row 2, column 5 Debris at row 3, column 0 Hits: 3 Loop over…