0% found this document useful (0 votes)
53 views36 pages

2025 LC Computer Science MS

The document is a marking scheme for the Pre-Leaving Certificate Examination 2025, detailing the structure and content of the exam for Higher and Ordinary Level Computer Science. It includes short answer questions on logic gates, memory types, number systems, data representation, artificial intelligence, universal design, and software development processes. Additionally, it covers long answer questions related to flowcharts, pseudocode, algorithms, and Python programming, providing a comprehensive guide for students preparing for the exam.

Uploaded by

Mary Anne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views36 pages

2025 LC Computer Science MS

The document is a marking scheme for the Pre-Leaving Certificate Examination 2025, detailing the structure and content of the exam for Higher and Ordinary Level Computer Science. It includes short answer questions on logic gates, memory types, number systems, data representation, artificial intelligence, universal design, and software development processes. Additionally, it covers long answer questions related to flowcharts, pseudocode, algorithms, and Python programming, providing a comprehensive guide for students preparing for the exam.

Uploaded by

Mary Anne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

*WMS34* Part of

CǞǠǝǘǙȨǛ SȰǤȨǟȰȨ
HIGHER & ORDINARY LEVEL
MARKING SCHEME
Pre-Leaving Certificate Examination 2025

Higher Level: page 2


Ordinary Level: page 18
HIGHER LEVEL Section A - Short Answer Questions

Section A 54 marks

Students answer any nine questions. Each question is worth 6 marks (9 x 6 marks = 54 marks)

Question 1

An example of a Logic Gate is the NOT Gate. The logic of the NOT gate can be described as
follows:
The NOT Gate is an inverter. If the input is 0 then the output will be 1. If the input is 1 then the
output will be 0.
Describe the logic of the following logic gates in a similar manner as above:

AND: The AND gate can only have an output of 1 if both inputs are 1. Otherwise the output is 0.
(2 marks) Allow for “ON” for “1” and “OFF” for “0”. Award 1 mark if reference is only made to an
output of 1.
OR: The OR gate can have an output of 1 if at least one of the inputs is 1. Otherwise the output is 0.
(2 marks) Allow for “ON” for “1” and “OFF” for “0”. Award 1 mark if reference is only made to an
output of 1.
XOR: The XOR gate can only have an output of 1 if exactly one of the inputs is 1. Otherwise the out-
put is 0.
(2 marks) Allow for “ON” for “1” and “OFF” for “0”. Allow for “High” for “1” and “Low” for “0”.
Award 1 mark if reference is only made to an output of 1.

Question 2

RAM and ROM are two types of memory found in computing systems.
State two differences between RAM and ROM.

Difference 1
RAM: Any valid answer
ROM: Any valid answer
3 marks - note: a comparison must be present for awarding of marks e.g. RAM is removable
from the motherboard, ROM is not removable from the motherboard.
Difference 2
RAM: Any valid answer
ROM: Any valid answer
3 marks - note: a comparison must be present for awarding of marks e.g. RAM is an example of
volatile memory, ROM is non-volatile memory

Question 3

The hexadecimal and binary systems are two systems used to represent data.

(a) Convert the following base 16 number to its base 2 equivalent

B9
Binary Number:
101110012
3 marks - subscript not needed

(b) Briefly explain why the binary number system is used in computing.

Explanation: The binary number system uses a series of 1s and 0s to represent switches in computers
(ON and OFF) and since it only uses two states, there is less chance of errors when saving and
sending data. Any valid answer.
3 marks

PAGE 2 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section A (continued) HIGHER LEVEL

Question 4

The ASCII and UNICODE systems are methods to represent data.

(a) Give one advantage of using the ASCII system.

Advantage of ASCII: It allowed for the exchange of text information between computers (2 marks).
Any valid answer

(b) State one advantage of using UNICODE over ASCII.

Advantage of UNICODE over ASCII: ASCII can only represent the characters and symbols of the English
alphabet, UNICODE can represent characters and symbols of all languages. Any valid answer
4 marks
Note: A comparison must be made for awarding of marks

Question 5

(a) What is meant by the term “Artificial Intelligence”?

Artificial Intelligence: Artificial Intelligence (AI) refers to the ability of machines or software to perform
tasks that typically require human intelligence. Any valid answer
3 marks

(b) Suggest a way that Artificial Intelligence can be used to help a Leaving Certificate student
to study for their examinations.

Can be used to generate sample questions


Can be used to generate sample essays
Any 1 valid answer
3 marks

Question 6

(a) Computers and Computer Systems should follow the principles of good Universal Design (UD).
What is meant by Universal Design (UD)?

Universal Design: All members of the public should be able to use your system regardless of their
level of experience in using the web or the device/operating system they use. Any valid answer
3 marks.

(b) User Experience (UX) is another set of principles that software developers try to follow
when designing a website. Give an example of how a website could be designed to allow
for good User Experience (UX).
Examples of good UX on a website:

All navigation should be fully accessible through the keyboard


Be consistent with navigation layout.
Navigation bars should be easy to identify and distinguish.
Navigation bars should provide feedback.
Make web pages appear and operate in predictable ways
If possible and appropriate web content should be usable on a variety of devices
Any one valid answer
3 marks

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 3 OF 32


HIGHER LEVEL Section A (continued)

Question 7 ITERATE

INVESTIGATE PLAN DESIGN CREATE EVALUATE DOCUMENT

The diagram above identifies some of the main stages of an iterative software development design
process. Describe briefly what happens at the following stages of the design process:

(i) Document stage

Report, present and reflect on the process


Give hardware/ software requirements to the user
Document the code
Provide algorithms and interfaces to the end user
Give instruction manuals
Marketing
Any one valid answer
3 marks

(ii) Plan stage

Understanding the problem


Creation of a workflow
Division of labour within the software development team
Any one valid answer
3 marks

Question 8

Two common methods of solving problems in coding are iteration and recursion.
Explain what is meant by the underlined terms.

Iteration: Iteration repeatedly executes a set of instructions to solve a problem.


Any valid answer.
3 marks
Recursion: Recursion solves a problem by breaking it down into smaller instances of the same
problem.
Any valid answer.
3 marks

PAGE 4 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section A (continued) HIGHER LEVEL

Question 9

Examine the headline from The Irish Times below and read the accompanying adapted sections
of the article and answer the questions that follow.

What neo-Luddites get right - and wrong - about Big Tech


Technology is quite capable of destroying livelihoods, creating unintended
consequences and concentrating power in the hands of a few

“...the Future of Employment study from Oxford academics Carl Frey and Michael Osborne in 2013
found that 47 percent of jobs were susceptible to automation. Then it was all the taxi and truck drivers
whose jobs would be gobbled up by self-driving vehicles. Now it’s ‘generative’ artificial intelligence,
which has struck fear into the hearts of creatives everywhere.

Do you agree with the above passage? Explain your answer.

Any valid response. Justification must be included for awarding of marks. (6 marks)

Question 10

Modelling and simulation are two important methods of applying computer science to solve
real-life problems.

(a) What is meant by a computer model?

Computer Model: A computer model represents a system or process through mathematical and
logical structures
3 marks

(b) What is meant by a simulation?

Simulation: A computer simulation uses the model to imitate the behavior and dynamics of a system
over time.
3 marks

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 5 OF 32


HIGHER LEVEL Section A (continued)

Question 11

When conducting analytics, it often involves the collection and cleaning of raw data into
transformed data.

(a) Explain the underlined term.

Raw Data: Raw data is data that hasn’t been processed, coded, formatted, or yet analyzed for useful
information.
3 marks

(b) Explain one method of cleaning data. Describe how you can clean data for it to be ready
for further analysis.

One method of cleaning data:


Removing/ replacing “NA” values
Checking/ removing/ replacing outlier values
Changing strings to integers/ floating point numbers
Any one valid response
3 marks

Question 12

Examine the images below and answer the questions that follow.

Volts (v) Volts (v)


5 5

0 0
Time (t) Time (t)

Figure 2 Figure 3

Which of the above figures corresponds to the transmission of a digital signal?

Figure: 3
2 marks
Briefly explain your answer:
The wave is discrete in Figure 3
4 marks

PAGE 6 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B Long Answer Questions HIGHER LEVEL

Section B Long Questions 76 marks

Answer any two questions @ 38 marks each

Question 13 - 38 marks

(a) The Von Neumann Architecture and an associated memory unit is shown below:

Study the image above and answer the following questions:

(i) Give an example of an input device.

Input device example: Keyboard/ mouse/ any valid answer


Any one 3 marks

(ii) Give an example of an output device.

Output device example: printer/ speaker/ monitor/ any valid answer


Any one 3 marks

(iii) What is the function of general registers within the Von Neumann Architecture?

Function of general registers: General registers are for calculating data and storing addresses
Any one 3 marks

(iv) What is the function of the Control Unit (CU)?

Function of the Control Unit: A component of a computer’s central processing unit that directs
operation of the processor.
Any one 3 marks

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 7 OF 32


HIGHER LEVEL Section B (continued)

(b)

(i) What is meant by the speed of a processor? What are the units of processor speed?

Processor speed: The speed at which the fetch-execute-decode cycle happens is the clock speed of
the CPU.
2 marks
Units: Hertz/ GigaHertz (GHz)/ MegaHertz (MHz)/ flops
Any one 1 mark

(ii) In computing terms, what is meant by “software”? Give an example of a piece of


computing software and what it is used for.

Software: Used to complete a specific task that is needed by the end users
2 marks
Example: Microsoft Word for word processing/ Microsoft Excel for spreadsheets/ Microsoft
PowerPoint for presentations/ any valid answer.
1 mark

(iii) What is meant by an Operating System?

Operating System: The basic software that is used to run a computer.


2 marks
State a function of an Operating System
Operating System function: Allows the computer to run other programs/ Communication with
peripherals/Coordinating tasks/ Dividing memory resources/ File management/ any valid answer
Any one 2 marks

(iv) What is the function of the ALU component of the CPU?

ALU function: A complex electronic circuit that can perform arithmetic, relational operations and
Boolean operations
1 mark for arithmetic, 1 mark for relational operations and 1 mark for Boolean operations.
Note: “complex electronic circuit” not needed for full marks

(v) What is meant by a 'User Interface (UI)'? Give an example of a type of user interface
software.

User Interface: The User Interface (UI) is the point of human-computer interaction and
communication in a device.
3 marks
Example: Graphical User Interface (GUI)/ Command Line Interface (CLI)
Any one for 1 mark. Accept acronyms.

(c)

(i) What is meant by the term “internet”?

Internet: A network of public computers. These networks are connected all over the world using
public telecommunication networks.
3 marks

(ii) The World Wide Web is built on top of the Internet. The World Wide Web uses protocols for
communication. Two examples of protocols that are used for communication on the World
Wide Web are HTTP and VOIP. State the function of HTTP and VOIP.

Function HTTP: HTTP is the protocol to exchange or transfer hypertext on the internet.
3 marks
Function of VOIP: A collection of protocols designed to deliver voice (and video) data over the
internet.
3 marks

PAGE 8 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B (continued) HIGHER LEVEL

Question 14 - 38 marks

(a) Flowcharts are often used in the software development process.

(i) What is meant by a “flowchart”?

Flowchart: A flowchart is a picture of the separate steps of a process in sequential order using shapes
and arrows to represent concepts. Any valid answer.
3 marks

(ii) State advantages of using flowcharts.

Flowchart advantage one: To visually communicate to others how a process is done. Any valid answer
3 marks
Flowchart advantage two: To study a process for improvement. Any valid answer
3 marks

(b) Using the following standard flowchart symbols, draw a flowchart in the space provided to
log in to a social media account. The user must enter the URL for the social media account
on their web browser. The user must then enter their username and password. The login
credential is then checked. If it is correct, the profile is shown. If the login credential is
wrong, an error message appears and we are asked to enter our login information again.
The program ends upon successfully entering the correct login information.

START

Enter URL

HOMEPAGE

Enter email
LOGIN ERROR
and password

Display email and password


Yes No
account page correct?

STOP

3 marks per correct shape (start, enter URL, homepage, email/ password input, email/
password correct, display account page, stop) 18 marks
2 marks for No/ False on decision
2 marks for Yes/ True on decision

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 9 OF 32


HIGHER LEVEL Section B (continued)

(c) Pseudocode is also used during the software design process.

(i) What is pseudocode?

Pseudocode: Pseudocode is a way of expressing an algorithm without conforming to specific syntax


rules.
3 marks

(ii) State an advantage of using pseudocode

Advantage of pseudocode: It is independent of any programming language and syntax allowing for
quick representation of a process or algorithm. Any valid answer
2 marks

(iii) State a disadvantage of using pseudocode

Disadvantage of pseudocode: It is non-visual / there are many versions available / making it can be
time consuming/ any valid answer
Any one 2 marks

Question 15 - 38 marks

(a) Algorithmic Thinking is an important process in the Computational Thinking Process.

(i) What is meant by an algorithm?

Algorithm: A set of instructions designed to accomplish a specific task in a number of steps.


3 marks

(ii) Give two applications of algorithms that can be used in everyday life.

Application 1: Any valid response (e.g. Google search for relevant content)
2 marks
Application 2: Any valid response (e.g. controlling of a traffic light system)
2 marks

(b) Examine the Python code below.

1 n1, n2 = 0, 1
2
3 n3 = 50
4
5 print(O)
6
7 while n2 < n3:
8 print(n2)
9 n1, n2 = n2, n1+n2
11

The Python code above can be used to generate the following sequence of numbers.

0 1 1 2 3 5 8 13 21 34

PAGE 10 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B (continued) HIGHER LEVEL

(i) Based on the above code and the pattern of numbers, describe the rules of the algorithm:

Each element in the array is the sum of the previous two elements
3 marks

(ii) Based on the code and the rules of the algorithm, what is the value of the missing number x?

0 1 1 2 3 5 8 13 21 34 X

Value of x: 55 (allow for Value of x: no value")


2 marks

(iii) Pattern recognition is another important part of the process of Computational Thinking.
What is meant by pattern recognition?

Pattern recognition: Pattern recognition is identifying algorithms you have used before that solved
different problem to solve this problem
3 marks

(c)
(i) Time complexity is an important measure of the efficiency of an algorithm. In terms of
algorithmic efficiency, what is meant by time complexity?

Time complexity: Time complexity refers to the amount of time an algorithm takes to run when
the input tends towards a specific or limiting value. It calculates the time taken to execute each
code statement in an algorithm/ It provides the best, worst and average time taken to complete an
algorithm/ Any valid response
6 marks

(ii) Sorting and Searching are two types of algorithms.


Study the Python code carefully below and answer the questions that follow
1 def mystery_function(numbers,v):
2 x = 0
3 y = len(numbers) - 1
4 z = 0
5 while x <= y:
6 z = (x+y)//2
7 if numbers[z] < v:
8 x = z + 1
9 elif numbers[z] > v:
10 y = z - 1
11 else:
12 return z
13 return -1
14 numbers = [0,2,4,6,8,10,12,14,16,18,20]
15 v = int(input("Enter a number: "))
16 result = mystery_function(numbers, v)
17 if result != -1:
18 print(v,"index: ", str(result))
19 else:
20 print("Element is not present in array")

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 11 OF 32


HIGHER LEVEL Section B (continued)

1. When the function mystery_function is called on line 16, what is the value of y? (there is
only 1).

Value of “y”: 10
1 mark

2. Identify one relational operator in the code above. State the function of the relational
operator.

Relational Operator: <, >, <=, !=


Any one 1 mark
Function of Relational Operator:
<: less than
>: greater than
<=: less than or equal to
!=: Not equal to
1 mark
Any one correct response

3. What is the function of the // operation in Line 6 above?

Function of //: This is floor division. This divides two numbers and rounds the result down to the
nearest whole number.
3 marks
Note: name of operator not needed for marks to be awarded.

4. Identify one parameter in the code above.

Parameter: numbers, v
2 marks
Any one
Allow 1 mark for an argument given

5. Which sorting or searching algorithm does this code represent?

Name of algorithm: Binary search


3 marks

6. What is the worst-case time complexity for the above algorithm?

Worst case time complexity: O(log n)


3 marks

7. What would the output be if you entered the following when after running the code?

Enter a number: 23

Output: “Element is not present in array”


3 marks

PAGE 12 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section C HIGHER LEVEL

Section C Programming 80 marks

Answer all question parts.

Question 16 (a) - 40 marks

(a) Open the program called Question16_A_HL.py from your device. The source code is shown
below.
Enter your name in the space provided on line 2 in your Python file.
The program initializes a variable called “s” and assigns it a value of 0 in Line 4 of the code.
The user is asked to enter a string input to be stored in the variable “sentence”.
1 #Enter your name here:
2
3 s = 0
4
5 sentence = input("Pleae enter a sentence: ")
6

Make the following changes to the program:

(i) Modify the code to count the number of times the character “S” or “s” appears in the
sentence entered by the user. When the code is run, it may look as follows:
Please enter a sentence: She sells sea shells by the sea shore
The number of s's was: 8

Counting the S’s by any method shown in solution: 5 marks


Print statement: 3 marks

(ii) Modify the code to count the number of vowels in the sentence entered by the user. In this
part, the sentence should be converted to lowercase. When the code is run, it may look as
follows:
Please enter a sentence: She sells sea shells by the sea shore
Your sentence was: She sells sea shells by the sea shore
Your lowercase sentence was: she sells sea shells by the sea shore
The number of vowels was: 10

Counting the vowels by any method shown in solution: 5 marks


Print statement: 3 marks

(iii) Modify the code so that the program will count the number of letters and digits that
appear in the user’s sentence. When the code is run, it may look as follows:
Please enter a sentence: Hello World 123
The number of letters was: 10
The number of digits was: 3

Converting the sentence to lowercase (by any method): 5 marks


Counting the letters by any method shown in solution: 5 marks
Counting the digits by any method shown in solution: 5 marks
Print statement: 3 marks

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 13 OF 32


HIGHER LEVEL Section C (continued)

(iv) Modify the code so that the program will count the number of words in a sentence.
When the program is run, it may look as follows:

Please enter a sentence: Computer Science is the best subject


The number of words was: 6
Save and close your file before moving on to the next part.

Counting the words by any method shown in solution: 3 marks


Print statement: 3 marks

1 #Question_16_A_HL
2 #Enter your name here:
3 s = 0
4 sentence = input("Please enter a sentence: ")
5 #i
6 for letter in sentence:
7 if letter == "s" or letter == "S": #NOTE ALSO ACCEPT USE
8 OF .COUNT()
9 s = s + 1
10 print("The number of S's was: ",s)
11 #ii
12 vowels = 0
13 print("Your sentence was: ",sentence)
14 sentence = sentence.lower()
15 print("Your lowercase sentence is: ",sentence)
16 for letter in sentence:
17 if letter == "a" or letter == "e" or letter == "i" or
18 letter == "o" or letter == "u": #NOTE ALSO ACCEPT USE OF
19 .COUNT()
20 vowels = vowels + 1
21 print("The number of vowels was: ",vowels)
22 #iii
23 letters = 0
24 digits = 0
25 for letter in sentence:
26 if letter.isalpha():
27 letters = letters + 1
28 elif letter.isdigit():
29 digits = digits + 1
30 print("The number of lotters was: ",letters)
31 print("The number of digits was: ",digits)
32 #iv
33 words = 1
34 for letter in sentence:
35 if letter == " ": #NOTE ALSO ACCEPT USE OF .COUNT()
36 words = words + 1
37 print("The number of words was: ",words)

PAGE 14 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section C (continued) HIGHER LEVEL

Question 16 (b) - 40 marks

In many supermarkets, customers have the opportunity to “Scan as you shop”. This involves
a customer using a handheld device (as seen in the image below) to scan the items as they go
around the shop. The price for each item appears on the screen, the total cost and the number
of items already scanned are displayed on the scanner.
Open the program called Question16_B_HL.py from your device. The source code is shown
below. A function called shopping() is defined, a variable called total is initialised to 0 and
two empty lists item_list and item_prices are also created.
Enter your name in the space provided on line 2 in your Python file.

1 #Question16_B_HL
2 #Enter your name here:
3
4 import random
5 print("Welcome to my shop")
6 total = 0
7 item_list = []
8 item_prices = []

(i) Modify the code that will ask the user to enter a shopping item as a string. It should store
the item names in item_list. It should also ask the user to enter the price of the item as a
float. The price should be stored in the list item_prices.
The “running total” should be displayed, that is, the current total cost of the shopping
while you shop.
If the user enters “stop” in the item list the full list of items should be printed to the screen
and the grand total should also be displayed as you are now telling the program you are
ready to checkout your shopping at the till. Sample output is shown below:

Welcome to my shop
Please enter the item: Apple
Please enter the price of the item: 1.5
The current total is € 1.5
Please enter the item: Pear
Please enter the price of the item: 1.3
The current total is € 2.8
Please enter the item: Orange
Please enter the price of the item: 2
The current total is € 4.8
Please enter the item: Kiwi
Please enter the price of the item: 0.9
The current total is € 5.7
Please enter the item: stop
Your items are: ['Apple ', 'Pear', 'Orange', 'Kiwi ']
The prices are: [1.5, 1.3, 2.0, 0.9]
Grand total € 5.7

5 marks input for fruit name


2 marks for appending into the correct list
5 marks for input of price
2 marks for appending into correct list
3 marks for use of while True
3 marks for correct breaking of loop
2 marks for printing fruit list
2 marks for printing price list
2 marks for printing grand total Total = 26 marks

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 15 OF 32


HIGHER LEVEL Section C (continued)

(ii) When the customer goes to the scan as you shop checkout (after they have entered
“stop”), they may be asked to call a member of staff to check random items in their trolley
to make sure the customer scanned everything correctly. Modify your code so that it will
now print 1 random item from that items list for the checkout assistant to check.
Sample output is shown below:

Welcome to my shop
Please enter the item: Apple
Please enter the price of the item: 1.5
The current total is € 1.5
Please enter the item: Pear
Please enter the price of the item: 1.3
The current total is € 2.8
Please enter the item: Orange
Please enter the price of the item: 2
The current total is € 4.8
Please enter the item: Kiwi
Please enter the price of the item: 0.9
The current total is € 5.7
Please enter the item: stop
Your items are: ['Apple ', 'Pear', 'Orange', 'Kiwi ']
The prices are: [1.5, 1.3, 2.0, 0.9]
Grand total € 5.7
Your random item to be checked is: Apple

4 marks for printing a random fruit correctly

(iii) From the shopping list above, modify your code so that it will find the most expensive and
cheapest item in the item list. Sample output is shown below:

Welcome to my shop
Please enter the item: Apple
Please enter the price of the item: 1.5
The current total is € 1.5
Please enter the item: Pear
Please enter the price of the item: 1.3
The current total is € 2.8
Please enter the item: Orange
Please enter the price of the item: 2
The current total is € 4.8
Please enter the item: Kiwi
Please enter the price of the item: 0.9
The current total is € 5.7
Please enter the item: stop
Your items are: ['Apple ', 'Pear', 'Orange', 'Kiwi ']
The prices are: [1.5, 1.3, 2.0, 0.9]
Grand total € 5.7
Your random item to be checked is: Kiwi
The most expensive item is: Orange
The cheaperst item is: Kiwi

5 marks for printing correct most expensive item using list indexing method
5 marks for printing correct cheapest item using list indexing method

Save your file.

Ensure that you have saved and closed all files before you finish the examination.

PAGE 16 OF 32 HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section C (continued) HIGHER LEVEL

1 import random
2 print ("Welcome to my shop")
3 total = 0
4 item list = []
5 item_prices = []
6 while True :
7 item = input ("Please enter the item: ")
8 if item == "stop" :
9 break
10 if item! = "stop" :
11 item list.append(item)
12 price = float(input("Please enter the price of the item:
13 "))
14 total = total + price
15 item_prices.append(price)
16 print("The current total is €" , total)
17 print("Your items are : " , item_list)
18 print("The prices are : " , item_prices)
19 print("Grand total € " , total)
20 random number = random.randint(O, len (item_list) - 1)
21 print(" Your random item to be checked is : - " , item_
22 list[random_number])
23 print("The most expensive item is : ",item list[item prices .
24 index(max(item prices))])
25 print("The cheapest item is : " , item_list[item_prices.
26 index(min(item_prices))])

HIGHER LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 17 OF 32


ORDINARY LEVEL Section A

Section A - Short Answer Questions - 54 marks

Answer any nine questions. Each question is worth 6 marks (9 x 6 marks = 54 marks)

Question 1

Data can be stored as a combination of bits (1 or 0). Place the following quantities in order of
data size (1 being the smallest and 4 being the largest)

Data quantity Order (1, 2, 3 or 4)


10 bits 1
3 nibbles 2
1 kilobyte 4
2 bytes 3

1 mark for the first correct answer


1 mark for the second correct answer
2 marks for third correct answer
2 marks for the fourth correct answer

Question 2

Examine the Logic Gate circuit below and answer the questions that follow.

(a) Currently, the two inputs, A and B, are OFF. What is the value of the output C?

OFF (also accept 0)


2 marks

(b) If input A was turned ON and input B was OFF, what would be the value of output C?

OFF (also accept 0)


2 marks

(c) If input A was turned ON and input B turned ON, what would be the value of output C?

ON (also accept 1)
2 marks

PAGE 18 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section A (continued) ORDINARY LEVEL

Question 3

Examine the Python code below and answer the questions that follow

1 import random
2 x = random.randint(2,7)
3 y = False
4 z = float(input(“Please enter a number:”))
5 a = z*x
6 print(a)
7 b = “True”

(a) Give the name of a variable with a Boolean value:

Variable name: y
3 marks

(b) Give one possible output for the variable “x”:

Possible value of variable x: accept any integer between 2 and 7 inclusive


3 marks

Question 4

State a difference between “The Internet” and “The World Wide Web”.

Internet: A network of connected computers or any valid answer (3 marks)


World Wide Web: A public hypertext system on the internet or any valid answer (3 marks)

Question 5

Computational Thinking is an important skill in Computer Science. Solving problems using


skills such as decomposition, pattern recognition, abstraction and algorithmic thinking can be
developed using puzzles as seen below.
In the diagram, we see three triangles made of matchsticks.
By moving exactly three individual matchsticks only, make 5 triangles made of matchsticks.

6 marks for correct answer


3 marks for a reasonable attempt

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 19 OF 32


ORDINARY LEVEL Section A (continued)

Question 6

The binary number system is used in computing and the transmission of data.

(a) Convert the following binary number to its decimal equivalent.

11011
2710
3 marks (subscript not needed)

(b) Convert the following decimal number to its binary equivalent.

50
1100102
3 marks (subscript not needed)

Question 7

The image below shows the basic hardware components of a computer.


Pick any two of these hardware components and state their function.

Component 1: Naming any component (1 mark)


Function: Giving correct function (2 marks)
Component 2: Naming any component (1 mark)
Function: Giving correct function (2 marks)
Note: The component and the function must match for the awarding of any marks

Question 8

Quillbot is an artificial intelligence technology that lets you rephrase text countless ways.
Quillbot AI helps by taking what you’ve written and finding new ways to say the same thing,
making it sound different but keeping the same meaning.
For example, a sentence such as: “The quick brown fox jumps over the lazy dog.”

Could be paraphrased in the following ways:


(1) “The speedy brown fox leaps over the lazy dog.”
(2) “A fast brown fox jumps over a lazy dog.”
(3) “The swift brown fox hops over the sluggish dog.”

Explain one positive and one negative impact of Quillbot on society.

Positive impact: Can be used to help improve someone’s vocabulary or any valid answer
3 marks
Negative impact: Could be used to plagiarise someone else’s work or any valid answer
3 marks

PAGE 20 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section A (continued) ORDINARY LEVEL

Question 9

(a) State what will be printed on the screen when the Python code below is run.

1 animal_1 = “cat”
2 animal_2 = “dog”
3 animal_3 = “mouse”
4
5 print(“The plural of ”, animal_1, “is”, animal_1 + “s”)
6 print(“The plural of ”, animal_2, “is”, animal_2 + “s”)
7 print(“The plural of ”, animal_3, “is”, animal_3 + “s”)

The plural of cat is cats


The plural of dog is dogs
The plural of mouse is mouses

2 marks

(b) Based on your output, identify one bug in the code above.

Bug: The plural of mouse is not “mouses” it is “mice”.


4 marks

Question 10
ITERATE

INVESTIGATE PLAN DESIGN CREATE EVALUATE DOCUMENT

The diagram above identifies some of the main stages of an iterative software development
design process. Describe briefly what happens at the following stages of the design process:

(a) Investigate stage

A research question is formed. A hypothesis is made. Any 1 valid answer


3 marks

(b) Create stage

Code/ hardware is programmed at this stage. Any 1 valid answer


3 marks

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 21 OF 32


ORDINARY LEVEL Section A (continued)

Question 11

The ASCII table can be seen below. The ASCII system is used to represent characters (called
symbols in the table) as a decimal number or a binary number, for example, “A” is represented
by the decimal number 65 and “g” is represented by 103

Using the information in the above tables, decode the following message from its decimal form
into symbols.

Decimal 72 101 108 108 111 32 87 111 114 108 100 33

Symbol H e l l o W o r l d !

6 marks for full solution (case sensitive answer)


3 marks for any six correct characters

Question 12

The internet and the World Wide Web are important tools. Social media can play a big role in
people’s lives. Suggest one benefit of people using social media and one precaution someone
should take when using social media.

Benefit of social media: Any valid answer 3 marks


Precaution of using social media: Any valid answer 3 marks

PAGE 22 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B Long Answer Questions ORDINARY LEVEL

Section B Long Questions 76 marks

Answer any two questions.

Question 13 - 38 marks

(a) The image shows an example of an embedded system (A BBC Micro:Bit) connected to a
small sound speaker using some crocodile clips. The A Button and the B Button are visible
on the BBC Micro:Bit and a 5x5 square of Light-Emitting Diodes (LEDs) are also on the front
of the BBC Micro:Bit. Examine the diagram carefully and answer the questions that follow.

(i) Is the A Button on the BBC Micro:Bit an example of a digital or analogue input? Explain
your answer.

Digital input
2 marks
It is either on or off
4 marks

(ii) Is the small sound speaker connected to the BBC Micro:Bit an example of a digital or
analogue output? Explain your answer.

Analogue output
2 marks
It can have many values when it is on
4 marks

(iii) Are the LEDs on the front of the BBC Micro:Bit an example of a digital or analogue output?
Explain your answer.

Digital output
2 marks
It is either on or off
4 marks

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 23 OF 32


ORDINARY LEVEL Section B

(b) A group of software developers wishes to program the BBC Micro:Bit above with an
interactive game. During the software development process, they create a flowchart
before starting to code. Examine the flowchart below carefully and answer the questions
that follow.
(i) Suggest a reason why it is a good idea for a software development team to create a
flowchart before starting to code BBC Micro:Bit

Flowcharts are a good way of sharing ideas between a software development team visually. Or any
valid answer
3 marks

Study the flowchart below


Start
and answer the questions that follow.

Press A
buƩon on
Micro:Bit

Micro:Bit
generates
a random
number
between
1 and 10
inclusive

User guesses a
number between
1 and 10

User number ==
random number?

B
Display ‘you win’
and play a sound on
the buzzer

End

(ii) On the flowchart above, label an example of the following standard flowchart shapes.

Input Any rhombus (1 mark)


Process Any rectangle (1 mark)
Decision Any diamond (1 mark)

(iii) Give an example of a word that could be used to replace the letter “A” in the diagram
above.

False
No
Any one for 3 marks

(iii) Give an example of a word that could be used to replace the letter “B” in the diagram
above.

True
Yes
Any one for 3 marks

PAGE 24 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B (continued) ORDINARY LEVEL

(c) Pseudocode is another way of representing a program before the developers start coding
it. Examine the pseudocode below and answer the questions that follow.

1 length ← 0
2 width ← 0
3 input length
4 input width
5 if length <= 0 or width <= 0 then
6 print(“Invalid length or width”)
7 else
8 area = length * width
9 print(area)
10 end if

(i) What does this algorithm do?

Finds the area of a rectangle (or square)


2 marks

(ii) If the user entered the following combination of length and width inputs, what would you
expect the output to be?

length = 5
width = 3
15
1 mark

(iii) Give a value of length and/or width that would result in the following output: “Invalid
length or width”

0
1 mark

(iv) If the output was shown as 30 and the length entered by the user was 10, what must the
width entered by the user have been?

3
1 mark

(v) Using the same syntax rules as the pseudocode above (or otherwise), write an algorithm in
pseudocode to find the area of a triangle.

1 base ← 0
2 height ← 0
3 input base
4 input height
5 if base <= 0 or height <= 0 then
6 print(“Invalid base or height”)
7 else
8 area = 0.5 * base * height
9 print(area)
10 end if

3 marks for fully correct


Allow for other pseudocode syntax to be used

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 25 OF 32


ORDINARY LEVEL Section B (continued)

Question 14 - 38 marks

(a) When designing a website, developers need to take into consideration the age and
computer experience of the user. Suppose you were asked to design a website for older
people to book trips abroad on. Briefly describe three ways you could design the website
to help them use the website as intended (e.g. thinking of Universal Design (UD) or User
Experience (UX)?).

1. Any valid answer (2 marks)


2. Any valid answer (2 marks)
3. Any valid answer (2 marks)

(b) Databases are used to store information digitally. Examine the database below and
answer the questions that follow.

(i) Identify the name of one column whose data are integers.

Student ID, age, Number of homework assignments submitted (out of 10 assignments), year
Any 1 for 2 marks

(ii) Identify the name of one column whose data are strings.

First Name, Surname, Year


Any 1 for 2 marks

(iii) Provide the first name of all the student(s) whose surname is “Johnson”.

Mary (1 mark)
Jamie (1 mark)

(iv) Provide the Student ID of the student(s) who are in 5th year AND who are not yet 18 years old.

0001
0004
0005
0007
All 4 required for 3 marks

(v) Provide the surname of the student(s) who submitted less than 50% of their homework
assignments AND who passed the exam at the end of the year.

None
Note: cannot leave this blank for marks - must let you know that they understand there are no
students.
2 marks

(vi) Identify one column that could be used as a primary key in this database and explain your
answer.

Student ID - it is a unique value to each student. No duplicates can be found with this column.
1 mark for correct column
2 marks for correct explanation

PAGE 26 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section B (continued) ORDINARY LEVEL

(c) Data in databases often needs to be sorted. One such method of sorting is the Bubble
sorting algorithm.
Perform a Bubble Sort on the data below using the spaces provided. You may stop once
the array is sorted from the smallest number to the largest number, you do not have to
use all of the spaces provided.

5 9 4 3 6

5 9 4 3 6

5 4 9 3 6

5 4 3 9 6

5 4 3 6 9

4 5 3 6 9

4 3 5 6 9

4 3 5 6 9

4 3 5 6 9

3 4 5 6 9

2 marks per correct row. Award full marks if duplicated rows are not present in solution.
18 marks

Question 15

(a) When conducting analytics, you may have developed algorithms or pieces of code to
perform numerical analysis on data (i.e. find the mean, median, mode and frequency of a
dataset).

In your answer book, match the method of numerical analysis with its correct description
in English.

Numerical analysis Description


Mean The sum of all the numbers in data divided by the number of numbers
Median The middle number of an ordered array
Mode The data that appears most often in a dataset
Frequency How often each item appears in the data

2 marks per correct answer - 8 marks

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 27 OF 32


ORDINARY LEVEL Section B (continued)

(b) You may need to search for a particular piece of data when you perform your Applied
Lrarning task. In the figure below, we see a collection of books with letters on their spine.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(i) Suppose you were searching for the book labelled “B”. Perform a binary search on these
books to find this book.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Search query is B
Look at middle letter (M)
Search query is not the same as middle letter
Search query (B) is less than M
Move to left hand side of array of M
Look at a letter roughly half way through array (e.g. G)
Search query is not the same as G
Search query (B) is less than G
Move to left hand side of array of G
Look at a letter roughly half way through array (e.g. D)
Search query is not the same as D
Search query (B) is less than D
Move to left hand side of array of D
Look at a letter roughly half way through array (e.g. B)
Search query is the same as middle letter
End
10 marks
Accept alternative middle letters other than G and D
Allow for more iterations
Allow for visually showing on the diagram

(ii) How does data have to be organised before applying a binary search?

It must be ordered (alphabetical if letters, smallest to largest or largest to smallest if numerical)


3 marks

(iii) Name another type of searching algorithm and describe how you would use it on the
books above to find the book labelled “K”.

Linear search (2 marks)


Start at left-hand item in array
Check if it is equal to the search query (K)
If not, move to the next item in the array
Repeat until search query is the same as the item in the array
6 marks

(c) In 1968, Douglas Engelbart gave a live demonstration of his computer. This computer was
the first to have a Graphical User Interface and a mouse.
Describe one other important development in computing that has occurred in the last 100
years and discuss its impact on computing today.

9 marks: 3 marks for the name of the development and 6 marks for the description
Any valid answers will be accepted.

PAGE 28 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section C ORDINARY LEVEL

Section C Programming 80 marks

Answer all question parts.

Question 16

(a) When you buy a drink in a container with the Re-turn logo you are charged a small
refundable deposit. You can then claim back the levy by returning the empty container.
The deposit costs between 15-25 cent depending on the size of the container.
• Containers between 150ml to 500ml have a 15 cent deposit
• Containers over 500ml to 3 liters have a 25 cent deposit
Open the program called Question16_A_OL.py from your device. The source code is shown
below.
Enter your name in the space provided on line 2 in your Python file.

#Question_16_A_OL
#Enter your name here:

value_small_containers = 0.15

number_small_containers = int(input(“Please enter how many small containers you


are returning: “))

There is a hard-coded variable called “value_small_containers” that has a value of 0.15


(this represents the return value of the containers between 150ml to 500ml as described
above). There is another variable called “number_small_containers” which allows the user
to enter the number of small containers that they returned.
Make the following changes to the program:

(i) Modify the code to the program that will find out the total value of the small containers
that the user returned. When the program is ran, it may look as follows:

Please enter how many small containers you are returning: 5


The total value of your small containers was: € 0.75

5 marks for the creation of a variable total_small_containers


5 marks for multiplication of value_small_containers*number_small_containers
2 marks for total_small_containers
1 mark for print statement 13 marks

(ii) Create a hard-coded variable called “value_large_containers” that has a value of 0.25
Ask the user to enter the number of large containers as an integer and store this in an
appropriately named variable.
When the program is ran, it may look as follows:

Please enter how many small containers you are returning: 5


The total value of your small containers was: € 0.75
Please enter how many large containers you are returning: 10
The total value of your large containers was: € 2.5

5 marks for the creation of a variable value_large_containers


5 marks for integer input of number_large_containers
5 marks for multiplication of value_large_containers*number_large_containers
2 marks for total_large_containers
1 mark for print statement 18 marks

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 29 OF 32


ORDINARY LEVEL Section C (continued)

(iii) Add some code that will show the user how much money in total they got from both their
small containers and large containers. When the program is ran, it may look as follows:f

Please enter how many small containers you are returning: 5


The total value of your small containers was: € 0.75
Please enter how many large containers you are returning: 10
The total value of your large containers was: € 2.5
Your grand total was: € 3.25

2 marks for creation of grand_total variable


2 marks for addition of total_large_containers + total_small_containers

(iv) The user can then bring the receipt from the Re-turn machine to the checkout and get the
value of their returns off their shopping.
Add some code that will ask the user how much their shopping bill was as a floating point
number and stored in an appropriately named variable.
The value of the Re-turn voucher should then be deducted from the shopping bill and the
new shopping bill will be shown.
When the program is ran, it may look as follows:

Please enter how many small containers you are returning: 5


The total value of your small containers was: € 0.75
Please enter how many large containers you are returning: 10
The total value of your large containers was: € 2.5
Your grand total was: € 3.25
Please enter your shopping bill: 9.75
Your shopping bill with the deposit return is: € 6.5

3 marks for creation of a variable for the float input for the shopping bill
2 marks for finding the new shopping bill total after taking away the deposit total
Save and close your file before moving on to the next part.

1 #Question_16_A_OL
2 #Enter your name here:
3 value_small_containers = 0.15
4 number_small_containers = int(input("Please enter how many small
5 containers you are returning: "))
6 #i
7 total_small_containers = value_small_containers*number_small_
8 containers
9 print("The total value of your_small_containers was : €", total_
10 small_containers)
11 #ii
12 value_large_containers = 0.25
13 number_large_containers = int(input("Please enter how many large
14 containers you are returning : "))
15 total_large_containers = value_large_containers*number_large_
16 containers
17 print("The total value of your large containers was : €", total_
18 large_containers)
19 #iii
20 grand_total = total_large_containers + total_small_containers
21 print("Your grand total was : € ", grand_total)
22 #iv
23 shopping_bill = float(input("Please enter your shopping bill : "))
24 print ("Your shopping bill with the deposit return is : €",
25 shopping_bill-grand_total)

PAGE 30 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


Section C (continued) ORDINARY LEVEL

(b) A standard single dice is 6 sided with the digits 1, 2, 3, 4, 5 and 6 on its sides. Some tabletop
games use non-standard dice (e.g. a 4-sided dice, a 12-sided dice or a 20-sided dice).
The digits on these dice are 1 to the number of sides on them (i.e. the 4 sided dice will have
the digits 1,2,3 and 4. The 12 sided dice will have the numbers 1 to 12 inclusive and the 20
sided dice will have the digits 1 to 20 on it).
Some of these non-standard dice can be seen in the following image:
Open the program called Question16_B_OL.py from your device. The source code is shown
below.
Enter your name in the space provided on line 2 in your Python file.

1 #Question_16_B_OL
2 #Enter your name here:
3
4 import random
5 print("Your options are as follows : d4, d6, d12 and d20")
6 n = int(input("Which type of dice do you want? 4, 6, 12 or 20 : "))

Implement a program that will ask the user to enter which type dice they want. This input
should be entered as an integer. The program will display a random integer from this dice
being rolled. If the user doesn’t enter a correct option, an appropriate message should be
displayed.
When the program is run, it may look as follows:

Your options are as follows: d4, d6, d12 and d20


Which type dice do you want? 4, 6, 12 or 20: 4
You will roll a 4-sided dice
The roll was: 4

When the program is run again, it may look as follows:

Your options are as follows: d4, d6, d12 and d20


Which type dice do you want? 4, 6, 12 or 20: 6
You will roll a 6-sided dice
The roll was: 5

When the program is run again, it may look as follows:

Your options are as follows: d4, d6, d12 and d20


Which type dice do you want? 4, 6, 12 or 20: 12
You will roll a 12-sided dice
The roll was: 2

When the program is run again, it may look as follows:

Your options are as follows: d4, d6, d12 and d20


Which type dice do you want? 4, 6, 12 or 20: 20
You will roll a 20-sided dice
The roll was: 2

When the program is run again, it may look as follows:

Your options are as follows: d4, d6, d12 and d20


Which type dice do you want? 4, 6, 12 or 20: 7
You made an incorrect choice

Save your file.

ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025 PAGE 31 OF 32


ORDINARY LEVEL Section C (continued)

Ensure that you have saved and closed all files before you finish the examination.

1 import random
2 print("Your options are as follows: d4, d6, d12 and d20")
3 n = int(input("Which type of dice do you want? 4,6,12 or 20: "))
4 if n == 4:
5 print("You will roll a 4-sided dice")
6 dice = random.randint(l,n)
7 print("The r oll wa s : ",dice)
8 elif n == 6 :
9 print("You will roll a 6-sided dice")
10 dice = random . randint(l,n)
11 print("The r oll wa s : ",dice)
12 elif n == 12 :
13 print("You will roll a 12-sided dice")
14 dice = random . randint(l , n)
15 print("The r oll wa s : ",dice)
16 elif n == 20 :
17 print("You will roll a 20-sided dice")
18 dice = random . randint(l , n)
19 print("The roll was: ",dice)
20 else :
21 print("You made an incorrect choice")
22
23
24
25
4 marks per branch on IF-ELIF-ELIF-ELIF-ELSE statement. Award 2 marks if IF used instead of
ELIF =
1 mark per correct print statement
1 mark per correct use of == operator
2 marks each for first three correct dice generation with 1 mark for final correct dice
generation
Note:
"dice = random.randint(1,4) in Line 6
dice = random.randint(1,6) in Line 10
dice = random.randint(1,12) in Line 14
dice = random.randint(1,20) in Line 18
Can be used instead of
dice = random.randint(1,n) for full marks" Total =

PAGE 32 OF 32 ORDINARY LEVEL COMPUTER SCIENCE | Pre-Leaving Certificate, 2025


NOTES
NOTES
NOTES
89F Lagan Road,
Dublin Industrial Estate,
Dublin 11

T: 01 808 1494
F: 01 836 2739
E: info@examcraŌ.ie
W: www.examcraŌ.ie

You might also like