Unit 2 Task 10: Sticker sheet total

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 2 Task 10 - Sticker sheet total

← Unit 2 tasks · Solution


You have N sticker sheets, with 1 sticker on the first sheet, 2 on the second, …, N on the last. The total number of stickers is 1 + 2 + … + N.

Ask for N (positive integer). Use a for loop to compute the total and print it.

Skills: for, range, accumulation.

Example: N = 4 → total 10.