Challenge
Command parser
Write parse_command(), which turns typed commands such as burn 12.5 or set mode safe into tuples and raises ValueError with a reason for anything malformed, then run a whole batch of commands and…
Showing 11–18 of 18
Challenge
Write parse_command(), which turns typed commands such as burn 12.5 or set mode safe into tuples and raises ValueError with a reason for anything malformed, then run a whole batch of commands and…
Challenge
Print each capsule event once, keeping the first copy, by checking every ID against a set of IDs already seen, then report which IDs came in more than once.
Challenge
…the try around the conversion only. Inside except , use continue to go straight to the next question; after the try , check the number.
Challenge
…burn_1 and store the number in after_first_burn . Modify. Continue the sequence: the second burn, the top-up and the third burn, each with -= or += , printing the level after each step: After burn 1…
Quiz
…basics , for loop with enumerate and range and break and continue . For loops inside loops, read nested loops in Python . After this one, try the Python If/Else Quiz or the Python Basics Quiz . What…
Article Python Fundamentals
…calculations to complex mission parameters. As you continue your journey in space-related Python programming, you'll find these basic concepts serving as the building blocks for more advanced…
Article Mini projects
…to fascinating phenomena like orbital resonances. As you continue your journey in space science, you'll encounter these and many other intriguing concepts. Keep exploring, future astronauts! The stars…
Article Python Fundamentals
…Think of it this way: if is mission go; else is the contingency plan. elif — multiple checkpoints elif (short for "else if") handles more than two options. fuel_percent = 50 if fuel_percent > 50…