Challenge
Status message crash
…Fix the print line without changing the message or the variable: turn the number into text where you join it, with str() . It must print: Altitude: 408 km Make: Docking status During docking, the…
Showing 41–50 of 53
Challenge
…Fix the print line without changing the message or the variable: turn the number into text where you join it, with str() . It must print: Altitude: 408 km Make: Docking status During docking, the…
Challenge
…give and store the answers, True or False , in the two variables. Run them to check, and remove any lines you added before you check. Modify. Work dry_run out by comparing the text with "True" , so it…
Challenge
…It repeats the same twelve lines for each engine, the variables are called t , m and s , and a fourth engine is being installed next month. Restructure it without changing a single character of what…
Challenge
…of (name, level) pairs and one loop. Keep the three level variables, which come from telemetry. The output must stay exactly the same: Tank A: 78.3% Tank B: 12.5% LOW Tank C: 46.0% Build tanks =…
Challenge
…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 reassigned to the space station. Take them…
Example
Parameters allow passing data to functions. Functions become more flexible.
Example
For loop iterates through sequence elements. Basic iteration over lists.
Challenge
…(use start, stop or status) Keep the typed text in one variable and the lower-case version in another. Check for empty text first. For Launch , the second line is printed.
Challenge
…f-string: put f right before the opening quote, and each variable in curly braces where its value goes. Note the two spaces after the level. Leave the three given lines as they are: a hidden test runs…
Challenge
…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 passed Leave the function as it is. The hidden tests…