While Loops
Learn how to repeat code while a condition remains true.
Learn by experimenting
Study the Python code, run it, change values and observe the output. Practical experimentation is an important part of learning programming.
Python Code
Python runs directly in your browser.
count = 1
while count <= 5:
print('Count:', count)
count += 1
Python Output
Program output appears here.
Test your understanding
Choose the best answer.
Which Python structure stores key-value pairs?