Free IB Computer Science check

15 questions, 15 minutes. Your score by area and the topic to fix first.

15:00 left · 0 of 15 answered

Question 11 mark

A program reads the same 20 values from memory thousands of times inside a loop. Why are the reads after the first pass faster than the first pass?

Question 21 mark

A laptop joins a café's Wi-Fi and is given the address 192.168.1.37 without the user typing anything. A week later it is given 192.168.1.52. Which explanation fits best?

Question 31 mark

An invented school stores tutors and students in two tables.

Table Tutor (invented data):

TutorIDTutorNameRoom
T1Mr OkoroB2
T2Ms LindC4
T3Mrs PatelB2

Table Student (invented data):

StudentIDNameTutorID
101IslaT2
102OmarT1
103PriyaT3
104TheoT2
105YusufT1

Which names does the query return, in the order shown?

SQL
SELECT Student.Name
FROM Student JOIN Tutor ON Student.TutorID = Tutor.TutorID
WHERE Tutor.Room = 'B2'
ORDER BY Student.Name;
Question 41 mark

An invented research team has only 900 labelled scans of a rare condition. It starts from a network already trained on millions of everyday photographs and retrains only the final layers on the scans. Which statement best describes this?

Question 51 mark

Which of these is the clearest example of decomposition?

Question 61 mark

The program takes a substring of a word and joins a number to it. What does it print?

Code
word = "PROGRAMMING"
part = word[3:7].lower()
print(part + str(len(word)))
Question 71 mark

This program searches a sorted list for 50 and prints each value it examines. What does it print?

Code
items = [3, 8, 12, 17, 21, 26, 30, 34, 39, 45, 50, 57, 61, 68, 72]
target = 50
low = 0
high = len(items) - 1
found = -1
while low <= high and found == -1:
    mid = (low + high) // 2
    print(items[mid])
    if items[mid] == target:
        found = mid
    elif items[mid] < target:
        low = mid + 1
    else:
        high = mid - 1
Question 81 mark

Three Ticket objects are created. What does this program print?

Code
class Ticket:
    __issued = 0

    def __init__(self, seat):
        Ticket.__issued = Ticket.__issued + 1
        self.__number = Ticket.__issued
        self.__seat = seat

    def getNumber(self):
        return self.__number

    @staticmethod
    def getIssued():
        return Ticket.__issued


t1 = Ticket("A1")
t2 = Ticket("A2")
t3 = Ticket("B4")
print(t2.getNumber(), Ticket.getIssued())
Question 91 mark

In the invented Corvale scenario, a robot moving at 1.5 metres per second needs to stop for a child who steps out. A round trip to the cloud over the mobile network takes about 200 ms and sometimes fails. Why is pedestrian detection run on the robot's own computer rather than in the cloud?

Question 101 mark

An HL student sits both written papers. How long are they in the exam room in total, not counting breaks?

Question 111 mark

A clinic archives X-ray scans that doctors must later see pixel for pixel. A video service streams films to phones over mobile data. Which pairing of compression suits them?

Question 121 mark

A video calling app sends live audio and video between two people. Which transport protocol suits the live stream, and why?

Question 131 mark

An invented school shop lists its prices in pounds.

Table Item (invented data):

ItemIDNamePrice
1Pencil case4.50
2Ruler5.00
3Calculator12.00
4Notebook7.25
5Highlighter set10.00
6Compass3.80

Which names does the query return, in the order shown?

SQL
SELECT Name FROM Item
WHERE Price BETWEEN 5 AND 10
ORDER BY Price DESC;
Question 141 mark

This code should print the whole-number average of the four marks (integer division: // in Python, / between two ints in Java). The total is 30, so it should print 7, but it prints 6. Which change fixes it?

Code
marks = [6, 8, 7, 9]
total = 0
for i in range(1, len(marks)):
    total = total + marks[i]
print(total // len(marks))
Question 151 mark

Which condition must hold for a binary search to find any value in a list correctly?

15 left blank

Independent preparation for IB Diploma Programme Computer Science. Not affiliated with or endorsed by the International Baccalaureate Organization.

Questions? support@unigenius.co.uk

Privacy · Terms