Bolt has reached an automated crystal factory. Four batches are waiting to be processed, and each batch contains two crystals. Use a loop to automate the work and keep a running total.
Your loop will process each batch automatically.
There are four batches.
Each batch adds
2
crystals to the running
total.
Use a
for
loop to process all four batches instead of
repeating the same instructions manually.
total
by 2 each time
If the loop used
range(3)
and each batch added
2
crystals, what would the final total be?
You combined a loop with a running variable to automate the factory and process all eight crystals.