Ceist Eile is in development. Features, questions and prices may change while we refine it.

Subjects · Leaving Cert Computer Science

Leaving Cert Computer Science: Selection & Boolean logic

How often Selection & Boolean logic comes up on the Computer Science papers, every year it was asked, and questions to try.

HL Asked on 5 of the last 5 Higher Level papers, most recently in 2025. banker

OL Asked on 5 of the last 5 Ordinary Level papers, most recently in 2025. banker

Selection & Boolean logic, Higher Level(7 marks)

Quick ones on Selection & Boolean logic.

(a)What does print(5 > 3 and 2 > 4) display?
  1. True
  2. False
  3. Error
(b)What does print(3 != 3 or 7 >= 7) display?
  1. Error
  2. False
  3. True
(c)Which Python operator tests whether two values are equal?
  1. ==
  2. !=
  3. =
Show the answers

(a) False

(b) True

(c) ==

Your turn: Higher Level questions on Selection & Boolean logic.

Higher Level

Asked on 5 of the last 5 Higher Level papers, most recently in 2025. banker

Every paper, year by year

YearWhere it came up
2025A9
2024A9, C16
2023A3, C16
2022A5
2021A6, B13, C16

Links open the State Examinations Commission’s paper for that year.

More Selection & Boolean logic questions

Selection & Boolean logic, 2 marks

What does print(10 % 2 == 0) display?

  1. False
  2. 0
  3. True
Show the answer

True

% gives the remainder: 10 % 2 is 0, and 0 == 0 is True. n % 2 == 0 is the standard test for an even number.

Selection & Boolean logic, 3 marks

By De Morgan's law, not (a or b) is the same as?

  1. a and b
  2. not a and not b
  3. not a or not b
Show the answer

not a and not b

Negating an or turns it into an and, with each part negated. not (a or b) is True only when a and b are both False.

Selection & Boolean logic, 2 marks

What does print(not (4 > 2)) display?

  1. False
  2. True
  3. Error
Show the answer

False

4 > 2 is True, and not flips True to False.

Ordinary Level

Asked on 5 of the last 5 Ordinary Level papers, most recently in 2025. banker

Every paper, year by year

YearWhere it came up
2025A1, B14, C16
2024A5, A8, C16
2023A1, A11, C16
2022C16
2021C16

Links open the State Examinations Commission’s paper for that year.

More Selection & Boolean logic questions

Selection & Boolean logic, 2 marks

Output of print(4 != 4)?

  1. True
  2. 0
  3. False
Show the answer

False

!= means not equal. 4 is equal to 4, so 4 != 4 is False.

Selection & Boolean logic, 3 marks

Output of print(6 >= 6)?

  1. 6
  2. True
  3. False
Show the answer

True

>= means greater than OR equal to. 6 equals 6, so it is True. 6 > 6 would be False.

Selection & Boolean logic, 3 marks

x = 7. Output of print(x > 5 and x < 10)?

  1. True
  2. False
  3. 7
Show the answer

True

and needs both parts True: 7 > 5 is True and 7 < 10 is True, so the result is True.

Other Computer Science topics

All of Leaving Cert Computer Science