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

Logic: If–Then, AND, OR, NOT

Standard difficulty · 20 questions · 40 marks · Time: 36 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.
"P AND Q" is true only when:
  1. both are false
  2. P is false
  3. at least one is true
  4. both P and Q are true
2.
Is this statement true or false? "NOT (20 is a multiple of 5) AND 20 ends in 9"
  1. True
  2. Sometimes true
  3. False
  4. Cannot be decided
3.
For how many numbers in the list is "x < 31 OR x is a multiple of 10" true? 8, 19, 7, 29, 1, 44, 32
  1. 5
  2. 4
  3. 2
  4. 6
4.
In a group of 44 children, 22 like singing, 19 like football and 8 like both. How many like neither?
  1. 36
  2. 3
  3. 19
  4. 11
5.
Rule: if it is a Saturday or a Sunday, the library opens at 10 a.m.; on other days it opens before 10 a.m.
Monday: opens at 9 a.m.
Friday: opens at 8 a.m.
Saturday: opens at 9 a.m.
Wednesday: opens at 9 a.m.
Tuesday: opens at 8 a.m.
Which day breaks the rule?
  1. Friday
  2. Saturday
  3. Monday
  4. Wednesday
6.
P is True and Q is True. Is "NOT P AND Q" True or False?
  1. False
  2. True
  3. Both True and False
  4. Cannot be decided
7.
Count from 1 to 36. For each number:
If it is a multiple of both 5 and 6, say "Clap-Jump"
Else if it is a multiple of 5, say "Clap"
Else if it is a multiple of 6, say "Jump"
Otherwise say the number.
How many times do you say "Jump" (only)?
  1. 6
  2. 5
  3. 1
  4. 7
8.
A model learned from these labelled examples: 10 → Yes, 5 → Yes, 35 → Yes, 8 → No, 41 → No, 29 → No. Which rule fits ALL of them?
  1. the number is more than 20
  2. the number is a multiple of 4
  3. the number ends in 5 or 0
  4. the number is less than 15
Section B — Short answer8 × 2 = 16 marks
9.
When is "P AND Q" true, and when is "P OR Q" true?
10.
Write True or False for each: (a) NOT (49 is greater than 40); (b) 41 ends in 7 OR 41 is a multiple of 5
11.
For how many numbers in the list is "x > 21 AND x is odd" true? 18, 1, 3, 10, 42, 39, 30, 34, 32
12.
In a group of 38 children, 19 like drawing, 20 like singing and 9 like both. How many like neither?
13.
Rule: if it is a Saturday or a Sunday, the library opens at 10 a.m.; on other days it opens before 10 a.m.
Sunday: opens at 10 a.m.
Thursday: opens at 9 a.m.
Friday: opens at 9 a.m.
Monday: opens at 8 a.m.
Tuesday: opens at 10 a.m.
Which day breaks the rule?
14.
P is True and Q is True. Is "P OR (NOT P AND Q)" True or False?
15.
Count from 1 to 24. For each number:
If it is a multiple of both 5 and 7, say "Clap-Jump"
Else if it is a multiple of 5, say "Clap"
Else if it is a multiple of 7, say "Jump"
Otherwise say the number.
How many times do you say "Clap-Jump"?
16.
How many numbers from 1 to 140 are multiples of 4 OR of 5 (or both)?
Section C — Word problems4 × 4 = 16 marks
17.
Make a truth table for "P AND Q" and "P OR Q" (four rows: TT, TF, FT, FF).
18.
(a) In a group of 24 children, 13 like milk, 18 like dancing and 8 like both. How many like neither?
(b) For how many numbers in the list is "x > 17 AND x is odd" true? 1, 29, 38, 35, 6, 40, 13
19.
Write True or False for each: (a) 45 is greater than 12 OR 45 is a multiple of 5; (b) 6 is a multiple of 5 OR 6 ends in 9; (c) NOT (40 is a multiple of 5); (d) NOT (11 is a multiple of 3) AND 11 is greater than 36
20.
(a) Rule: if it is a Saturday or a Sunday, the library opens at 10 a.m.; on other days it opens before 10 a.m.
Thursday: opens at 10 a.m.
Tuesday: opens at 8 a.m.
Friday: opens at 9 a.m.
Saturday: opens at 10 a.m.
Sunday: opens at 10 a.m.
Which day breaks the rule?
(b) P is False and Q is True. Is "NOT P OR NOT Q" True or False?
AmbifulWorksheets
Practice that never repeats
CBSE · Class 7 · Computational Thinking and AI

Answer key

Logic: If–Then, AND, OR, NOT · AW-7CT-LOG-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.

QAnswerWorking
1(d) both P and Q are true—
2(c) FalseNOT true AND false
3(a) 5true for: 8, 19, 7, 29, 1
4(d) 1122 + 19 − 8 = 33 like at least one; 44 − 33
5(b) SaturdaySaturday is a weekend day but opens earlier
6(a) Falseput P = True, Q = True and work out the brackets first
7(b) 5multiples of 30 (both): 1; of 5: 7; of 6: 6
8(c) the number ends in 5 or 0"the number ends in 5 or 0" gives every label; each other rule gets at least one example wrong
9"P AND Q" is true only if both are true; "P OR Q" is true if at least one is true.—
10(a) False; (b) False(a) NOT true; (b) false OR false
111true for: 39
12819 + 20 − 9 = 30 like at least one; 38 − 30
13TuesdayTuesday is a weekday but opens at 10
14Trueput P = True, Q = True and work out the brackets first
150multiples of 35 (both): 0; of 5: 4; of 7: 3
165635 + 28 − 7 (multiples of 20 counted twice)
17P AND Q: T, F, F, F. P OR Q: T, T, T, F.—
18(a) 1; (b) 2(a) 13 + 18 − 8 = 23 like at least one; 24 − 23; (b) true for: 29, 35
19(a) True; (b) False; (c) False; (d) False(a) true OR true; (b) false OR false; (c) NOT true; (d) NOT false AND false
20(a) Thursday; (b) True(a) Thursday is a weekday but opens at 10; (b) put P = False, Q = True and work out the brackets first