WeCodeAcademy

Conditions and Loops

Python uses indentation to group code.

Examplepython
Open in editor »
Quick check

How does Python mark the body of an if statement?

Your turn: write the code

Print the even numbers from 1 to 10, one per line (2, 4, 6, 8, 10).

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.