AmbifulWorksheets
Practice that never repeats
CBSE · Class 6 · Computational Thinking and AI

Loops and Conditions

Standard difficulty · 20 questions · 40 marks · Time: 37 minutes

Name: Date: Score: ____ / 40

Show your working for Sections B and C. Answers are on the last page — try every question first!

Section A — Choose the correct answer8 × 1 = 8 marks
1.
Repeating a set of steps again and again is called a:
  1. condition
  2. pixel
  3. bug
  4. loop
2.
Start with n = 8.
While n is 114 or less: say n, then add 6 to n.
How many numbers are said?
  1. 18
  2. 17
  3. 19
  4. 20
3.
x = 1
Repeat 7 times: x = x + 11
What is x at the end?
  1. 89
  2. 77
  3. 67
  4. 78
4.
Repeat 5 times:
Repeat 2 times: clap
Then stamp once
How many stamps in all?
  1. 2
  2. 7
  3. 5
  4. 10
5.
A drawing robot follows: repeat ___ times (move forward 15 steps, turn right 45°). It ends where it started, facing the same way, after drawing a closed shape. How many times must it repeat?
  1. 7
  2. 8
  3. 9
  4. 16
6.
x = 78
Repeat 4 times:
If x is even, x = x ÷ 2
Otherwise, x = x + 1
What is x at the end?
  1. 9
  2. 10
  3. 20
  4. 11
7.
Count from 1 to 39. For each number:
If it is a multiple of both 7 and 6, say "Clap-Jump"
Else if it is a multiple of 7, say "Clap"
Else if it is a multiple of 6, say "Jump"
Otherwise say the number.
How many times do you say "Clap" (only)?
  1. 5
  2. 4
  3. 6
  4. 0
8.
Zoya's box has ₹0.
While the box has less than ₹485: add ₹40 and count one day.
How many days are counted?
  1. 15
  2. 14
  3. 12
  4. 13
Section B — Short answer8 × 2 = 16 marks
9.
What is a loop? Give an example from daily life.
10.
Start with n = 13.
While n is 88 or less: say n, then add 6 to n.
How many numbers are said?
11.
x = 172
Repeat 20 times: x = x − 7
What is x at the end?
12.
Repeat 6 times:
Repeat 3 times: clap
Then stamp once
How many claps in all?
13.
A drawing robot follows: repeat 3 times (move forward 30 steps, turn right 120°). How many steps does it move in all?
14.
x = 64
Repeat 4 times:
If x is even, x = x ÷ 2
Otherwise, x = x + 5
What is x at the end?
15.
Count from 1 to 34. For each number:
If it is a multiple of both 3 and 5, say "Clap-Jump"
Else if it is a multiple of 3, say "Clap"
Else if it is a multiple of 5, say "Jump"
Otherwise say the number.
How many times do you say "Clap" (only)?
16.
Tara's box has ₹25.
While the box has less than ₹620: add ₹45 and count one day.
How many days are counted?
Section C — Word problems4 × 4 = 16 marks
17.
A robot draws using "repeat N times: move forward 20, turn right T°". (a) What N and T draw a square? (b) An equilateral triangle? (c) Why must N × T be 360?
18.
(a) Start with n = 18.
While n is 84 or less: say n, then add 4 to n.
How many numbers are said?
(b) Isha's box has ₹30.
While the box has less than ₹745: add ₹50 and count one day.
How many days are counted?
19.
(a) Repeat 5 times:
Repeat 5 times: clap
Then stamp once
How many claps in all?
(b) A drawing robot follows: repeat 8 times (move forward 15 steps, turn right ___°). It draws a regular octagon. What angle fills the gap?
20.
(a) x = 5
Repeat 24 times: x = x + 12
What is x at the end?
(b) x = 72
Repeat 4 times:
If x is even, x = x ÷ 2
Otherwise, x = x + 5
What is x at the end?
AmbifulWorksheets
Practice that never repeats
CBSE · Class 6 · Computational Thinking and AI

Answer key

Loops and Conditions · AW-6CT-LCO-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.

QAnswerWorking
1(d) loop—
2(a) 188, 14, …, 110: (110 − 8) ÷ 6 + 1 = 18
3(d) 781 + 7 × 11
4(c) 5one stamp per round, 5 rounds
5(b) 88 × 45° = 360°
6(b) 1078 → 39 → 40 → 20 → 10
7(a) 5multiples of 42 (both): 0; of 7: 5; of 6: 6
8(d) 13₹0 + 13 × ₹40 = ₹520, which is the first total of ₹485 or more
9Repeating steps again and again, e.g. stirring a pot "until the sugar dissolves" or doing 10 skips.—
101313, 19, …, 85: (85 − 13) ÷ 6 + 1 = 13
1132172 − 20 × 7
12183 claps in each of 6 rounds = 6 × 3
13903 × 30
14464 → 32 → 16 → 8 → 4
159multiples of 15 (both): 2; of 3: 11; of 5: 6
1614₹25 + 14 × ₹45 = ₹655, which is the first total of ₹620 or more
17(a) N = 4, T = 90. (b) N = 3, T = 120. (c) To close the shape the robot must turn through one full turn, 360°, in total.—
18(a) 17; (b) 15(a) 18, 22, …, 82: (82 − 18) ÷ 4 + 1 = 17; (b) ₹30 + 15 × ₹50 = ₹780, which is the first total of ₹745 or more
19(a) 25; (b) 45°(a) 5 claps in each of 5 rounds = 5 × 5; (b) the turns add up to one full turn: 360° ÷ 8
20(a) 293; (b) 14(a) 5 + 24 × 12; (b) 72 → 36 → 18 → 9 → 14