1. (a) Outline one feature of a word processor that could reduce the amount of typing required when writing letters. [2] (b) State the purpose of technical documentation provided with software. [1]
International Baccalaureate
IB Computer Science SL: questions by topic
“Best part: the questions are grouped by topic so I can drill my weak spots.”
You’re practising 2019–2020 papers. The 2021–2026 papers, including 2026, need a plan.
Unlock from $6/mo2. An airline has a server that holds the flight database. Passengers can check in using a number of self-service client kiosks located in the airport. (a) (i) Define the term client . [1] (ii) Define the term server . [1] (b) Explain the functions performed by the server in this situation. [4]
3. Compare direct changeover with parallel running as a method of implementation. [4]
4. The machine instruction cycle is a sequence of actions that a central processing unit (CPU) performs to execute each machine code instruction in a program. (a) State where the program is held. [1] (b) State the part of the central processing unit (CPU) that performs the decoding. [1] (c) Outline the function of the memory address register (MAR). [2]
5. Describe the steps involved in using the bubble sort algorithm to sort an array. [4]
6. Construct a truth table for the following logical expression. [4] (A xor B) and not C
7. A school has a local area network (LAN) connecting its computers and peripheral devices. The LAN also provides access to the internet. (a) Describe the role of a router in this network. [3] Users have been troubled by slow speeds when accessing the internet. (b) Outline two reasons why there might be a reduction in data transmission speed at certain times. [4] (c) Outline two measures that the school could take to safeguard its data from unlawful access via the internet. [4] The inventory of office supplies used in the school is stored on the computer as a single file. Each of the office supplies in the inventory (such as paper, ink, toner, printers, pens, staplers, pencils and scissors) has a unique ID number, name, maximum quantity, minimum quantity and remaining quantity. (d) Outline the steps in an algorithm that would output a list of supplies with the quantity to be ordered. [4]
8. Website developers need to consider a range of usability factors when designing a website. (a) Identify two usability factors that need to be considered in the design of a website. [2] (b) Outline one reason why visual displays on a computer screen can create difficulties for some people. [2] A company promotes its products online. To make a purchase, customers are required to register with the company and provide data like their name, date of birth, age, gender and email address. Once registered, more than one customer is able to access the server to retrieve and modify their data at the same time. (c) (i) State where the customer data is held during the process of modifying their data. [1] (ii) Explain how the operating system ensures that each customer’s data is secure when multiple users are accessing the data at the same time. [4] The company is considering sharing its customers’ data with marketing organizations. (d) Explain why there could be ethical issues for the company when sharing its customers’ data. [6]
9. A school has 100 students. All student names (strings) and student ID numbers (five-digit integers) are held in two separate one-dimensional arrays named SID and SNAMES . SID SNAMES [0] 10011 [0] Aron Zucker [1] 10002 [1] Cary Armand [2] 11876 [2] Pia Baranger [3] 10122 [3] Peter Bow [4] 22103 [4] John Buffet… [99] 32000 [99] Evan Apples For example, student Pia Baranger has ID number 11 876. A binary search algorithm is not used to find a particular name in array SNAMES . (a) State the reason for not using a binary search. [1] The school offers its sporting program to students and has a basketball team, a tennis team and a football team. Each student must choose at least one of these three sports. Three collections, BASKETBALL , TENNIS and FOOTBALL , are created. When a student chooses a sporting activity, their ID number is added to the appropriate collection. For example: BASKETBALL = {10011, 11876, 10122} TENNIS = {10011, 11876, 10002} FOOTBALL = {10011, 10002, 22103, 32000} The method isIn(X, COL) is available, where: y X is a five-digit integer representing an ID number y COL is a collection that holds student ID numbers. The method isIn(X, COL) returns True if the ID number X is in the collection COL ; False otherwise. For example: isIn(11876, BASKETBALL) returns True isIn(11876, FOOTBALL) returns False (b) Construct an algorithm in pseudocode for the method isIn(X, COL) . [4] The football and tennis training sessions are held at the same time. The football coach would like to know how many students will not be able to attend the football training session because they will be attending the tennis training session. (c) Construct an algorithm in pseudocode that will output the number of students who have chosen both tennis and football. The method isIn() should be used in your answer. [3] The school coordinator would like to check whether there are students who have not yet chosen any one of the three sports. (d) Construct an algorithm in pseudocode that will output the names of students who have not yet chosen any one of the three sports. An appropriate message should be displayed if every student has chosen a sport. [7]
1. The Driving Licensing Agency stores information about individuals who hold a driving license and/or own vehicles. The following rules apply: y Each individual may only hold one driving license. y Each individual may own more than one vehicle. y Each vehicle may be owned by one individual only. (a) Construct the entity-relationship diagram (ERD) that shows the relationship between the individual, their driving license, and their vehicle(s). [2] When an individual applies for a driving license, they have to complete a license application form. The following is an extract from that form: Figure 1: Extract from driving license application form Surname First name(s) Mr Mrs Miss Ms Other title Male Female Day Month Year Date of birth (b) Explain why Date of birth has been separated into three fields. [3] The data in the form shown above is stored in the Person table. The license application form also requires an individual’s medical information. This is stored in a table called PersonMedical . The following extract is a sample of the medical questions that are asked. Figure 2: A sample of the medical questions asked on the license application form Have you ever had any of the No Yes following conditions? If you have answered “Yes”, please tick all the appropriates boxes. Epilepsy Fits or blackouts Repeated attacks of sudden disabling giddiness Diabetes controlled by insulin (c) Explain two reasons why medical information should not be stored in the Person table. [6] (d) Outline two issues caused by storing redundant data. [4] (e) Outline two situations where data stored by the Driving Licensing Agency may need to be open to interrogation by other parties. [4]
2. Billetmania is an online company that sells tickets for theatre performances and music concerts. After a customer has chosen their seats, they can pay for the tickets through a secure online payment system. Once the transaction has been completed, the customer receives an email receipt. (a) Define the term database transaction . [1] An information system and a database are used for Billetmania ’s day-to-day operations. (b) Outline how the Billetmania information system would utilize a database. [2] (c) Explain the importance of transaction durability to Billetmania when clients book tickets. [3] (d) Explain how the Billetmania database management system ensures that a seat is not booked by two people simultaneously. [4]
3. WineForAll is a retailer that sells wine in its stores. Each store sells wine from a number of vineyards. The following extract from the Wine file contains unnormalized data. NameOfWine Vineyard Description UnitPrice Region StoreID StockQty 2015, Dry, Chardonnay Stormy Bay $19.99 Gisborne 1 45 13 % Sauvignon 2017, Dry, Stormy Bay $29.99 Gisborne 2 20 Blanc 12 % Sauvignon 2017, Dry, Stormy Bay $29.99 Gisborne 1 45 Blanc 12 % 2016, Brut, Pelorus Stormy Bay $34.99 Gisborne 1 10 14 % Pecan 2016, Fruity, Pinot Noir $29.99 Gisborne 3 32 Block 14 % Sauvignon Pecan 2017, $29.99 Gisborne 4 25 Blanc Block Dry,13 % 2013, Fruity, Shiraz James Tree $25.99 Hawkes Bay 3 15 13.5 % 2013, Fruity, Shiraz James Tree $25.99 Hawkes Bay 2 40 13.5 % 2014, Fruity, Merlot James Tree $29.99 Hawkes Bay 1 25 14 % Sauvignon 2016, Dry, John Glad $19.99 Gladstone 4 30 Blanc 12.5 % 2017, Dry, Chardonnay John Glad $15.99 Gladstone 2 28 13.5 % (a) Define the term record . [1] (b) Identify the steps to create a query to find the vineyards and names of fruity wines where the quantity in stock is between 25 and 35 bottles. [3] (c) (i) Identify the steps to create a non-persistent derived field called TotalPrice , which would hold the total value of wine stored for each record. [2] (ii) Outline why the inclusion of a derived field will not affect the normalization of a database. [2] (d) Construct the 3rd Normal Form (3NF) of the unnormalized Wine file. [6] (e) Outline why a single-field primary key is not always an appropriate solution for normalized databases. [2]
4. EnviroBuild is a construction company that recently purchased land. It has permission to build either small houses or large houses but not both types of house. The maximum number of small houses that can be built is 10. The maximum number of large houses that can be built is five. The cost of building the houses is calculated using a model with the following three variables: House_Type : The type of house (small or large). House_Num : The number of houses to be built. Profit : The total sales revenue minus the land costs, labour costs and material costs. (a) Identify the data types for the House_Type , House_Num and Profit variables. [3] The decision whether to build small houses or large houses is a purely financial one and is based on the following information: y A single payment of $500 000 for the land, regardless of whether 10 small houses or five large houses are to be built. y The revenue from each house sale will be $220 000 for a small house and $400 000 for a large house. y The labour costs will be $2500 per day, regardless of the type of house built. y It will take 17 days to build each small house and 23 days to build each large house. Houses are built sequentially so that they can be sold as soon as they are completed. y The material costs will be $100 000 for each small house and $190 000 for each large house. (b) Construct a spreadsheet model that shows the total profit for the chosen type of house. The user must input the House_Type and House_Num to calculate the total profit. [6] (c) Outline two validation tests that should be included in the test plan for this spreadsheet model. [4] To finance this project, EnviroBuild took out a bank loan of $400 000 and will be required to pay interest on this loan. The project starts on 1 January 2021. The following steps are used to calculate the total profit: y Read the Profit variable and the No_of_Days variable from the spreadsheet model in (b). y Calculate the number of months that the project will take. ◦ There are no partial months. ◦ For example, if a project finished on 1 July 2021, the loan interest rates will include July: the project will last for 7 months. y The rate of interest on the bank loan of $400 000 is 1 % per month. y The land tax is $500 per month. (d) Construct the pseudocode that will calculate the profit after these additional costs have been considered. You can introduce any new variables, if necessary. [5]
5. Global warming is a term used to describe the increase in mean global temperatures. There have been numerous computer simulations developed to predict the effects of global warming. One simulation is NASA’s Virtual Earth System Laboratory (VESL), which allows users to see how climate change affects glacier size, global sea level and changes to the coastline. The VESL runs simulations in real time and is an abstraction of reality. (a) (i) Outline what is meant by a real-time simulation in the context of a glacier size simulation. [2] (ii) Outline what is meant by the statement “the VESL simulation is an abstraction of reality”. [2] A recent study reported that previous simulations of predicted global sea levels for 2100 were highly inaccurate. (b) Outline two reasons why predictions of global sea levels from simulations may not be accurate. [4] (c) NASA has decided to make its simulation software available for other scientists as well as members of the public. Evaluate the social and ethical implications of this decision. [6]
6. Simulation software can be used to produce a 3D visualization of rising sea levels that change as the user alters the percentage of ice that has melted. Figure 3: 3D visualization of rising sea levels (a) (i) Define the term visualization . [1] (ii) Identify how a 2D visualization could be used in this scenario. [1] (b) Explain the benefits of using visualization when simulating rising sea levels. [5] Once the 3D visualization has been rendered, when the user drags a slider bar to simulate the amount of ice that has melted, the visualization is re-rendered without any delay. Figure 4: Slider bar to simulate different percentages of sea ice Remove Ice 10 % (c) Describe how this 3D visualization is rendered. [6]
7. Pugh University has a website that allows computer science students to enter their name and customize the web pages. Consider the section of HTML and CSS code shown below . File name: index.html < !DOCTYPE html > < html > < body > < script > function setVar(){ var subject = document.getElementById("kippers").value; document.getElementById("subj").innerHTML = subject; } < /script > < h2 > My First Page < /h2 > < p > Welcome to the < span id = "subj" >< /span > Faculty < /p > < input type = "text" id = "kippers"/ > < button onclick = "setVar();"/ > clickme < /button > < /body > < /html > (a) (i) State the output of the index.html file in the web browser. [2] (ii) Describe the processing that takes place when the user inputs “Pugh” into the text box and then uses the clickme button. [3] When a student enrolls, they must enter their name on a web page. Before being added to the database, the system should check that the name typed is not blank and that it has not already been added to the database. (b) Explain why these two validation checks occur on different computer systems. [4] Consider the following URL: https://www.follettibstore.com (c) Explain how website certificates are used to authenticate a user’s browser through secure protocol communications like HTTPS. [3] The common gateway interface (CGI) offers a standard protocol for web servers. (d) Describe the working of the common gateway interface (CGI). [4] Pugh University uses cloud computing services , such as Google Docs or Office 365. (e) Describe how cloud computing is different to a client–server architecture. [4]
8. The internet and World Wide Web are often considered to be the same, or the terms are used in the wrong context. (a) Distinguish between the internet and the World Wide Web. [2] Many organizations produce computer-based solutions that implement open standards. (b) Outline two advantages of using open standards. [4] A search engine is software that allows a user to search for information. The most commonly used search algorithms are the PageRank and HITS algorithms. (c) Outline why a search engine using the HITS algorithm might produce different page ranking from one using the PageRank algorithm. [2] Web crawlers browse the World Wide Web. (d) Explain how data stored in a meta-tag is used by a web crawler. [3]
9. The World Wide Web can be divided into three categories: the surface web, the dark web and the deep web. (a) Distinguish between the surface web and the deep web. [2] The dark web is only accessible by using specialist software, such as TOR and I2P. Many users of the dark web use it to protect their anonymity. (b) Explain how a user’s anonymity can be maintained while accessing the dark web. [3] Many users of the dark web use peer-2-peer (P2P) networks for activities like torrent streaming. This opens up ports on the computer to upload and download data. (c) Explain why users have concerns about opening up ports to upload and download data. [3] (d) The founders of the World Wide Web intended it to be a decentralized and democratic environment. To what extent have the aspirations of the founders of the World Wide Web been met? [6]
10. A company provides car parking services in large cities and needs a computer system to keep track of the number of vehicles using its parking areas. When a vehicle arrives, its registration plate is recorded on the system and it is allocated a number that identifies where it should park. When the vehicle leaves , that space is made available for other vehicles to use. Vehicles are identified by their unique registration plate, which is an alphanumeric code of eight characters ( eg X1234567 ). This is clearly displayed on the vehicle. A programmer created the classes ParkingArea and Vehicle to model the above situation. public class ParkingArea { private Vehicle vehicles[]; private String name; ParkingArea(String name, int capacity) { this.name = name; if (capacity > 300) capacity = 300; this.vehicles = new Vehicle[capacity]; } String getName() { return name; } public int getCapacity() { return vehicles.length; } public int findVehicle(String reg) { //find where the vehicle is located in the array and //return the index not yet written } } public class Vehicle { private String registration; private byte colour; private boolean broken; public final static byte BLACK = 1; public final static byte WHITE = 2; public final static byte BLUE = 3; public final static byte RED = 4; public final static byte GREEN = 5; private final static double ADMIN_FEE = 3; public Vehicle() {} public Vehicle(String registration) { this.registration = registration; } public Vehicle(String registration, byte colour) { this.registration = registration; this.colour = colour; } public void setBroken(boolean broken) { this.broken = broken; } public void setColour(byte colour) { this.colour = colour; } public boolean getBroken() { return broken; } public String getRegistration() { return registration; } public double pay(int hours) { // code to return admin fee - only if applicable } } (a) Outline one effect of using the modifier static when declaring a variable. [2] (b) Describe the relationship between the classes Vehicle and ParkingArea . [3] (c) Outline why it is necessary to use the keyword this in the setBroken method of the Vehicle class. [2] (d) (i) Construct code to create an instance of the Vehicle class that has a registration of X1234567 . [2] (ii) Construct code that sets the colour of the object created in part (i) as black. [2]
11. (a) Construct the method addVehicle(Vehicle v) that will add a vehicle to the first empty position of the array vehicles[] and return the position ( ie the index of the array) at which it has added the car. If it is not possible to fit the vehicle into the array then it should return -1 . [6] (b) Outline two differences between inheritance and aggregation. [4] Two further classes, Car and Motorbike , are created. public class Car extends Vehicle{ public static double hourlyFee = 3.5; public double pay(int hours) { //code to calculate and return the complete price } } public class Motorbike extends Vehicle{ public static double hourlyFee = 2.5; public double pay(int hours) { //code to calculate and return the complete price } } (c) Construct a UML diagram that shows the relationships between the ParkingArea , Vehicle , Motorbike and Car classes. There is no need to include the attributes or methods of each class. [4] The method pay in the Vehicle class returns the administration fee (which is only part of the total price), while the method pay of the Car class calculates the total price for a car staying in the parking area. (d) (i) Construct the method pay in the Vehicle class that returns the admin fee stored in the variable AdminFee if the vehicle has stayed for five hours or less; otherwise, it returns 0. [2] (ii) Construct the method pay in the Car class, where it uses the vehicle method pay but adds the charge for the amount of time spent in the parking area. [2] The array vehicles[] in the ParkingArea class is used to store instances of the Car or Motorbike class. (e) Outline why Vehicle is a valid type for this array. [2]
Revision method
How to use the Computer Science SL question bank
Practise 391 authentic past-paper questions from 32 archived papers (2019-2026). These are past-paper questions, not AI-generated exam-style substitutes. Start with a topic, then switch to mixed or timed practice.
- Choose a topic. Focus your practice on a real past-paper topic rather than a generated exam-style substitute.
- Work through the available questions and answers. Use the matching mark scheme to check your reasoning and identify a precise gap.
- Export when eligible. Guests can view up to 20 matching free questions; a free account can access the remaining free selection. PDF export is subject to eligible bank access and the account’s download allowance.
Computer Science SL: quick facts
How many questions are in the IB Computer Science SL question bank?
The IB Computer Science SL question bank has 391 past-paper questions from 32 papers, sat 2019-2026, sorted into 15 topics.
Which topics come up most in IB Computer Science SL?
The most-tagged IB Computer Science SL topics are B2 Programming (85), A1 Computer fundamentals (79) and Topic 1: System fundamentals (earlier syllabus) (76), out of 391 questions. These are archive counts, not a prediction, and a question can carry more than one topic.
Is the IB Computer Science SL question bank free?
Partly. IB Computer Science SL questions from 2019–2020 are free with a free account. Questions from other years and PDF worksheets need a plan, from $6 a month.
Do the IB Computer Science SL questions have answers?
Yes. Each IB Computer Science SL question shows the official mark scheme answer. Many also have a step-by-step worked explanation written by PastPaperPrep.