Loops (for/while)
Computer Science · Python
Loading practice question…
About this practice set
Loops (for/while) is part of Computer Science (Python). Questions are generated with new numbers each time you practise. Levels available: Easy. After you answer, an explanation is shown.
Example questions
A taste of what you will practise. Answers are revealed after you try.
Easy
What does this Python code print? total = 0 for i in range(4): total += 1 print(total)