Space Python Loading Python…

While Loop Basics

 
0:00 / 0:00

Challenge

Practise what this example shows with these challenges.

Never-ending wait

Fix the codeEasy 3 stages

A while loop waits for the antenna signal but never moves on to the next reading, so it never ends. Predict it, find the stuck counter, fix it, then write a wait that gives up when the readings run out.

Start the challenge

Paged results

Write the codeMedium 2 stages

Merge three pages of launch results into one list with extend(), then fetch page after page in a while loop and stop at the first short page, the way paginated API responses are read.

Start the challenge

Discussion

Stuck on this example or want to go further? Ask here, or see what others asked.

Log in to ask and reply.

script.py
PythonLn 1, Col 1Spaces: 4
Loading the Python environment…

Separate arguments with commas. They're passed on every Run as sys.argv[1:].