Bolt has reached the final escape route. Five energy crystals are scattered across five sectors, but an obstacle blocks sector 2. Write a complete program that navigates the route, collects enough energy and launches Bolt to safety.
Collect five crystals and reach the launch pad.
energy = 0.
collect_crystal()
function.
range(5).
collect_crystal()
and add 1 to
energy.
robot.launch(energy).
for
loop
if/else
decision at sector 2
In your final program, what different jobs
do the for loop and
if/else statement perform?
You guided Bolt through ten missions using variables, input, conditions, loops, functions, combined logic and debugging. You have now written and repaired real Python programs to solve increasingly complex problems.