CLASS 7 · Computational Thinking

Class 7 CT and AI: Number Play Solutions

Work with binary light states, logical implications, digit grids and number patterns.

Book: CBSE CT and AISession: 2026–27
Jump to a question or activity
  1. Suggested activity
  2. Activity 1
  3. Activity 2
  4. Activity 3
  5. Activity 4
  6. Activity 5
  7. Activity 6
  8. More Puzzles Case 3
  9. More Puzzles Case 4
  10. More Puzzles Case 5
  11. Question 1
  12. Question 2
  13. Question 3
  14. Question 4
  15. Question 5
  16. Question 6
  17. Question 7
  18. Question 8
  19. Question 9
  20. Question 10
  21. Thinking Spot
  22. Short concept lessons
  23. Additional practice questions

Key ideas

Represent OFF by 0 or O and ON by 1 or U. A clue filters the possible states; it does not necessarily determine a single state. In particular, “if A then B” does not say that A is true.

Short Concept Lessons

Learn a method, follow the example, then use it in the additional practice.

Count independent ON/OFF states

Each independent light has two states. Multiply by two for each additional light.

Worked example

Four independent lights have 2 × 2 × 2 × 2 = 16 possible states.

Remember: A clue may reduce the count by fixing some positions.

Practise this method →
Apply every clue as a filter

List possible states, then remove every state that breaks a clue. Use U for ON and O for OFF.

Worked example

For RGB, Red ON and Blue OFF leave UOO and UUO.

Remember: A wildcard X is an unspecified position, not a third light state.

Practise this method →
Read “if” carefully

If A then B rules out A being true while B is false. It does not assert that A is true.

Worked example

If Red ON implies Blue ON, then both-OFF is still allowed by that clue alone.

Remember: Do not reverse an implication or assume its starting condition.

Practise this method →
Use digit place values

Write a two-digit number as 10a + b. Its reversal is 10b + a, so their difference is 9(a − b).

Worked example

72 − 27 = 45, a multiple of 9.

Remember: Distinct digits give a nonzero difference.

Practise this method →
Track even and odd totals

Even plus even is even; odd plus odd is even; odd plus even is odd. Adding an odd number changes parity.

Worked example

A row increasing by 3 alternates odd, even, odd or even, odd, even.

Remember: Parity can rule out answers without calculating every value.

Practise this method →
List cases and prove a minimum

Use an organised list to avoid missing possibilities. For a minimum, show both a lower bound and a way to reach it.

Worked example

If each action reaches at most two of six objects, at least three actions are needed; a valid three-action arrangement proves the minimum.

Remember: A lower bound alone does not prove an arrangement is possible.

Practise this method →

Questions and Solutions

Activity: Logical puzzle punch cards. In this activity, you will use punched cards to solve logical puzzles. By stacking, aligning, and filtering the cards, we will see how complex reasoning can be built from simple decisions – True or False, mirroring how binary logic works inside a computer.

The scenario is that you have the following lights in the room: Yellow Y, Pink P, Red R, Green G, and Blue B. By following the clues given in the Case Cards, you have to figure out which lights are ON in the given Puzzle. To solve these puzzles, we have a deck of cards representing all possible combinations of these lights being ON or OFF.

Each card has five positions for holes on the top, and each position corresponds to a coloured light mentioned above in the given order.

Each position has two possible hole types: U-shaped or O-shaped. Each card represents one possible combination. If a light is ON in a card, then the hole corresponding to it is U-shaped. If a light is OFF in a card, then the hole corresponding to it is O-shaped.

All two states for one hole, four states for two holes and eight states for three holes.

Solution

Suggested approach.

Use five positions in the order Y, P, R, G, B. Each has two states, so there are 2⁵ = 32 cards. For an ON requirement, retain U-slot cards at that position; for an OFF requirement, retain closed O-hole cards. Keep only states satisfying every clue. A stick lifts closed O holes, while open U slots slip off. Record surviving states after each clue so the reasoning can be checked.

Activity Q1. Can you identify which bulbs are ‘OFF’ based on the card?

Card11: Y and R closed O holes, P G B open U slots; Yellow and Red bulbs are off.
a) Blue B and Yellow Y bulbs
b) Green G and Red R bulbs
c) Red R and Yellow Y bulbs
d) All bulbs are OFF

Solution

Option (c) Red R and Yellow Y bulbs. The card has closed O holes at Y and R, indicating OFF. P, G and B have open U slots and are ON. The full pattern is O U O U U.

Activity Q2. Can you identify which bulb is OFF based on this pattern: RGB = U U O?

a) Red bulb
b) Green Bulb
c) Blue Bulb
d) All bulbs are OFF

Solution

Option (c) Blue Bulb. The last position is B and contains O. The first two U positions show that Red and Green are ON.

Case 1: Focusing on RGB cards only (with 8 cards only)

Statements

I. The Red light is ON
II. The Blue light is OFF
III. ON light only has OFF Neighbour

In RGB order, U means ON, O means OFF, and X means the position is not fixed. Statement I removes RGB = O X X cards. Statement II keeps cards with Blue OFF. Statement III rules out neighbouring ON lights.

Activity Q3. After performing an action using Statement I, how many cards are left in the pack?

a) 8
b) 4
c) 2
d) 1

Solution

Option (b) 4. Of the eight RGB states, Red is ON in half. Green and Blue are still free, giving 2 × 2 = 4 states: UOO, UOU, UUO and UUU.

Activity Q4. After performing the action using Statement II, among these, which card will not be discarded?

a) RGB = X X O
b) RGB = U O U
c) RGB = X X U
d) All will be eliminated

Solution

Option (a) RGB = X X O. Keep cards whose last position is O. Combined with the previous Red-ON clue, the remaining cards are UOO and UUO; X means a position not yet fixed by this clue alone.

Activity Q5. What is the pattern of the last card (solution)?

a) RGB = U U O
b) RGB = U O U
c) RGB = O U U
d) RGB = U O O

Solution

Option (d) RGB = U O O. Red is ON and Blue OFF. Green neighbours the ON Red light and therefore must be OFF. Only UOO remains.

Case 2: Focusing on RGB cards only (with 8 cards only)

Statements

I. The Red light is ON
II. The Lights are either all ON or all OFF

Activity Q6. Among these, what would be the pattern of the solution?

a) RGB = U O O
b) RGB = O O O
c) RGB = U O U
d) RGB = U U U

Solution

Option (d) RGB = U U U. All lights must share one state. Red is already ON, ruling out all-OFF and forcing all-ON.

More Puzzles — Case 3. (Take cards from 0 to 15)

The Red light is ‘ON’

‘ON’ Light only has ‘OFF’ Neighbours

Exactly Even Lights are ‘ON’

Case3 card with the three conditions reproduced above.

Solution

YPRGB = O O U O U. Cards 0–15 have Y OFF. Red ON forces its neighbours P and G OFF. The count of ON lights must be even; with Red already ON, Blue must also be ON. The two ON lights are separated, and the total is 2.

More Puzzles — Case 4. (Take cards from 0 to 31)

The Yellow light is ‘ON’

The Pink light is ‘OFF’

If Yellow light is ‘ON’, then Blue light is ‘ON’

Red and Green are either both are ‘ON’ or ‘OFF’

If Blue light is ‘ON’, then Red light is ‘OFF’

Case4 card with its five conditions reproduced above.

Solution

YPRGB = U O O O U. Y is ON and P OFF. The Y ⇒ B clue makes B ON. B ⇒ R OFF makes R OFF. R and G have the same state, so G is OFF. All five positions are now fixed.

More Puzzles — Case 5. (Take cards from 0 to 31)

If Yellow light is ‘ON’, so is Pink light

Either Green light or Blue light, or both of them, is ‘ON’

If Yellow light is ‘ON’, then Blue light is ‘ON’

Red and Green are either both are ‘ON’ or ‘OFF’

If Blue light is ‘ON’, then Red light is ‘OFF’

Case5 card with its five conditions reproduced above.

Solution

It has five valid states, not one, under the printed clues. In YPRGB order they are OOOOU, OOUUO, OUOOU, OUUUO and UUOOU.

If B is ON, R must be OFF, so G is OFF as R and G match. With Y OFF, P can be OFF or ON; with Y ON, P must be ON. These give three states. If B is OFF, the “G or B” clue requires G ON, hence R ON. Y must be OFF because Y ⇒ B, but P remains free, giving two more states. The clues need an extra condition if a unique card is intended.

Q1. Form the largest four-digit odd number by selecting exactly one digit from each row and each column.

What is the sum of the digits?

Four rows: 7,4,5,3; 6,9,2,6; 5,1,3,2; 8,9,7,4.
a) 21
b) 22
c) 23
d) 24

Solution

Option (c) 23; the largest number is 9833. Choose 9 at row 2 column 2, 8 at row 4 column 1, and the 3s at row 1 column 4 and row 3 column 3. This uses one entry from each row and column. Arrange them as 9833. Choosing 5 instead of one 3 forces a final even digit unless 5 is placed at the end, giving the smaller 9825.

Q2. In the given image, S, T, and N represent distinct single-digit numbers, where T > S.

What is the value of N + S?

Vertical addition: ST6 plus TSN equals1768.
a) 13
b) 12
c) 9
d) 11

Solution

Option (c) 9. In ST6 + TSN = 1768, the units give 6 + N = 8, so N = 2 with no carry. The remaining sum is ST + TS = 176, or 11(S + T) = 176. Thus S + T = 16. Distinct digits with T > S give S = 7, T = 9, and N + S = 9. Check: 796 + 972 = 1768.

Q3. Each square of the given puzzle must be filled with a single-digit natural number such that:

– The sum of all four different digits in each row and each column is 10

– All the inequality signs (< and >) between the boxes must be followed

Find the correct values of A and B.

Four-by-four grid with row1:1,blank,blank,4; row2:2,B,blank,A; row3:blank,3,blank,blank; row4:blank,blank,2,blank. Vertical inequalities point from smaller to larger.
a) A = 3, B = 4
b) A = 2, B = 1
c) A = 1, B = 4
d) A = 3, B = 1

Solution

Option (d) A = 3, B = 1. Four distinct positive digits summing to 10 must be 1,2,3,4. B’s row contains 2, and its column contains 3 and a bottom entry greater than 3, which must be 4. Thus B = 1. A’s row now contains 2 and 1, and its column contains 4, so A = 3. A completed grid is rows (1,2,3,4), (2,1,4,3), (4,3,1,2), (3,4,2,1).

Q4. How many cells contain a digit equal to the sum of all the other digits in its corresponding row and column combined?

Rows:3,blank,blank,6;1,2,3,blank;blank,4,blank,2;5,blank,blank,1.
a) 2
b) 3
c) 4
d) 5

Solution

Option (c) 4. The qualifying entries are the top-right 6 = 3 + 2 + 1; the 3 in row 2 column 3 = 1 + 2; the 4 in row 3 column 2 = 2 + 2; and the bottom-left 5 = 3 + 1 + 1. Blank cells do not add a value, and the selected cell itself must not be counted in its comparison sum.

Q5. Using the digits 1, 2, 3, and 4, form the highest and the smallest three-digit numbers such that each number contains exactly two different digits.

What is the sum of the two numbers formed?

a) 545
b) 555
c) 565
d) 575

Solution

Option (b) 555. With exactly two distinct digits, the greatest number is 443 and the smallest is 112. Repeating all three digits would violate the rule. Their sum is 443 + 112 = 555.

Q6. A 2-digit number is formed using two different digits, and the digits are reversed to create another 2-digit number.

The difference between these 2 numbers CANNOT be:

a) An even number
b) An odd number
c) A prime number
d) An integer

Solution

Option (c) A prime number. The difference between 10a + b and 10b + a is 9(a − b). Its positive magnitude is a nonzero multiple of 9, so it is composite. Such multiples may be even or odd, and are always integers.

Q7. A four-digit number has the same number of even and odd digits.

Which of the following could possibly be the sum of the digits of this number?

a) 11
b) 15
c) 20
d) All of these

Solution

Option (c) 20. Two odd digits sum to an even number, and the two even digits also sum to an even number. Hence the total must be even; 11 and 15 cannot work. For example, in 2477, 2 and 4 are even, 7 and 7 are odd, and the sum is 20.

Q8. The given grid is to be filled with distinct single-digit natural numbers such that:

● The sum of each row is the same and is an even number

● The larger number in each column is placed in the red block

What is the sum of the numbers in the white blocks?

Two-row grid: top white blank, red blank, red7; bottom red4, white8, white blank.
a) 16
b) 17
c) 15
d) 20

Solution

Option (a) 16. Above the 8, the red cell must be 9. The top-left white cell is below 4 and must make its row sum even; it is 2. The top row then sums to 2 + 9 + 7 = 18. The bottom-right cell is 18 − 4 − 8 = 6. White cells total 2 + 8 + 6 = 16.

Q9. A computer generates rectangles where the length and breadth (dimensions) follow a series. If the pattern continues, what will be the area of the next rectangle the computer should draw?

2 × 3, 3 × 5, 5 × 8, 8 × 13, 13 × 21, ?

a) 693 sq. units
b) 2210 sq. units
c) 442 sq. units
d) 714 sq. units

Solution

Option (d) 714 sq. units. The dimensions follow consecutive terms of the pattern in which each new number is the sum of the previous two. After 13 × 21 comes 21 × 34, giving area 21 × 34 = 714.

Q10. Given below is a 3 × 3 grid to be filled by numbers from 1 to 9 such that:

● Every pair of adjacent digits in a row should have a difference of three

● Some of the numbers have already been placed

Based on the given conditions, choose the correct option.

Three-by-three grid with1 top-left,5 centre,9 bottom-right.
a) A row can have all numbers as even
b) A row can have all numbers as odd
c) A row can have 2 even and 1 odd number
d) All of these

Solution

Option (c) A row can have 2 even and 1 odd number. Adding or subtracting 3 changes parity, so a row cannot be all even or all odd. One valid grid is rows (1,4,7), (2,5,8), (3,6,9). The middle row has two even entries, 2 and 8, and the odd entry 5.

The Thinking Spot

Given below are bulbs, each with a switch beneath it.

When you press a switch, it lights up ONLY the adjacent bulbs and not the bulb above the switch. What is the minimum number of switches you need to press to light up all the bulbs?

Eight unlit bulbs in a row, each with an off switch below it.
a) 2
b) 3
c) 4
d) 5

Solution

Option (c) 4. Press switches 2,3,6,7, counting from the left. They light bulbs {1,3}, {2,4}, {5,7}, {6,8}, respectively. All eight bulbs are lit. Each press can light at most two bulbs, so fewer than four presses cannot light all eight.

Additional Practice Questions with Solutions

Choose an answer, use a hint if needed, then open the worked solution to check your reasoning.

Solved 0 of 10 · Checked 0 of 10

Your practice progress lasts until you reset or reload this page.

Apply · binary

Practice Q1. How many ON/OFF states are possible for four independent lights?

Choose one answer for Practice Q1
Show hint

Multiply two choices four times.

Show worked solution

Option (c) 16.

2⁴ = 16 states.

Common mistake: Do not add the two choices for each light.

Apply · filter

Practice Q2. For RGB cards, Red must be ON and Blue must be OFF. Green is unrestricted. Which states remain?

Choose one answer for Practice Q2
Show hint

Fix the first position as U and the last as O.

Show worked solution

Option (a) UOO and UUO.

Green can be O or U, giving UOO and UUO.

Common mistake: An unrestricted light keeps both possibilities.

Apply · if

Practice Q3. The only clue says: “If Red is ON, Blue is ON.” Which state is forbidden?

Choose one answer for Practice Q3
Show hint

An implication fails when its condition holds but its required result does not.

Show worked solution

Option (b) Red ON, Blue OFF.

Red ON requires Blue ON, so Red ON with Blue OFF is forbidden.

Common mistake: The clue does not require Red to be ON.

Apply · filter

Practice Q4. Three lights R, G and B are in a line. Red is ON, no neighbouring lights may both be ON, and exactly two lights are ON. What is RGB?

Choose one answer for Practice Q4
Show hint

Green is next to the ON Red light.

Show worked solution

Option (d) UOU.

Green must be OFF. Since exactly two lights are ON, Blue must be ON: UOU.

Common mistake: Check the count as well as the neighbour rule.

Apply · digits

Practice Q5. What is the positive difference between 83 and its digit reversal?

Choose one answer for Practice Q5
Show hint

The reversal of 83 is 38.

Show worked solution

Option (b) 45.

83 − 38 = 45. It is also 9 × (8 − 3).

Common mistake: Reversal changes the place values.

Apply · parity

Practice Q6. A four-digit number contains exactly two odd digits and two even digits. Its digit sum must be:

Choose one answer for Practice Q6
Show hint

Pair the two odd digits and the two even digits.

Show worked solution

Option (c) Even.

Odd + odd is even, and even + even is even. Adding these two even totals gives an even sum.

Common mistake: An even total need not be divisible by four.

Apply · systematic

Practice Q7. Using digits 2, 3 and 5, form the greatest and smallest three-digit numbers that each use exactly two different digits. What is their sum?

Choose one answer for Practice Q7
Show hint

One digit must repeat, but all three cannot be the same.

Show worked solution

Option (a) 776.

The greatest is 553 and the smallest is 223. Their sum is 776.

Common mistake: Exactly two different digits excludes 555 and 222.

Apply · digits

Practice Q8. In A5 + 2A = 69, A5 and 2A are two-digit numbers. Find A.

Choose one answer for Practice Q8
Show hint

Use A5 = 10A + 5 and 2A = 20 + A.

Show worked solution

Option (a) 4.

11A + 25 = 69, so 11A = 44 and A = 4. Check: 45 + 24 = 69.

Common mistake: Use place values, not products.

Apply · parity

Practice Q9. Three numbers in a row increase by 3 from left to right. If the first is even, what is their parity pattern?

Choose one answer for Practice Q9
Show hint

Adding 3 changes parity each time.

Show worked solution

Option (b) Even, odd, even.

Even + odd is odd; then odd + odd is even. For example, 2,5,8.

Common mistake: Apply the change at every step.

Apply · systematic

Practice Q10. Six bulbs stand in a line, all initially OFF. Pressing a switch lights only the neighbouring bulbs, not its own bulb. What is the minimum number of switches needed to light them all?

Choose one answer for Practice Q10
Show hint

The end bulbs require switches 2 and 5. Then check bulbs 2 and 5 themselves.

Show worked solution

Option (c) 4.

Switches 2 and 5 are required for bulbs 1 and 6. Those switches do not light bulbs 2 or5, and no single switch neighbours both 2 and 5. Two more switches are needed. Pressing 1,2,5,6 lights all six bulbs, so the minimum is 4.

Common mistake: A lower bound of three is not enough; check whether three can actually work.

Scroll to Top