Final exam
Computer Science Principles
Before you start
- 20 questions, drawn at random from a pool of 34.
- Pass mark: 70%. Your final score is 30% practice + 70% exam.
- No time limit, but finish within 3 hours. You can move between questions before you submit.
- Failed? Review the lessons and try again: every attempt gets a new set of questions.
Question 1 of 20Choose one
A team gathers feedback from users after each version of their app and uses it to plan the next version. What does this describe?
Question 2 of 20Sort into groups
Identify the type of each error.
Tap an item, then tap its group (or drag it there).
Question 3 of 20Choose one
A program should accept test scores from 0 to 100. Which set of test inputs best checks its boundaries?
Question 4 of 20True or false
Including people with diverse backgrounds on a development team can help catch problems that other members wouldn't notice.
Question 5 of 20Work it out
What decimal value does the binary number 1001101 represent?
Question 6 of 20Work it out
How many different values can be represented with 6 bits?
Question 7 of 20Choose one
In many programming languages, 0.1 + 0.2 displays as 0.30000000000000004. Why?
Question 8 of 20Choose one
Which is an example of analog data being converted to digital data?
Question 9 of 20Sort into groups
Which compression type fits each requirement?
Tap an item, then tap its group (or drag it there).
Question 10 of 20True or false
Editing a photo's metadata, such as its date, changes the colors of the pixels in the photo.
Question 11 of 20What would you do?
What would you do?
A study finds that students who carry water bottles get higher grades. A newspaper headline says "Water bottles boost grades." What is the best response?
Question 12 of 20Work it out
Trace this code and enter the value displayed. a ← 3, b ← 5, a ← a + b, b ← a - b, a ← a - b, DISPLAY(a)
Question 13 of 20Choose one
list ← [10, 20, 30, 40]. After REMOVE(list, 2) and then APPEND(list, 50), what is list[2]? (AP lists start at index 1.)
Question 14 of 20Fill in the blanks
Fill in the blanks
In AP pseudocode, the procedure that returns the number of elements in a list is . The first element of a list is at index .
Question 15 of 20True or false
Procedural abstraction means a programmer can use a procedure knowing what it does without knowing exactly how it does it.
Question 16 of 20Work it out
What does this code display? total ← 0, FOR EACH n IN [4, 7, 2, 9], IF(n > 3) total ← total + n, then DISPLAY(total)
Question 17 of 20Work it out
What does this display? count ← 0, n ← 100, REPEAT UNTIL(n < 10) { n ← n / 2, count ← count + 1 }, DISPLAY(count)
Question 18 of 20Choose one
Which expression is true exactly when the number x is divisible by 3?
Question 19 of 20Select all that apply
Which values could RANDOM(2, 5) return? Select all that apply.
Select all that apply.
Question 20 of 20True or false
Binary search can be used on any list, whether or not it is sorted.
Question 21 of 20Choose one
A sorted list doubles in size from 500 to 1,000 items. Roughly how does the worst-case number of checks for binary search change?
Question 22 of 20Sort into groups
Classify each situation.
Tap an item, then tap its group (or drag it there).
Question 23 of 20Choose one
What is a heuristic?
Question 24 of 20Put in order
Order these events when a browser loads a web page by its domain name.
Drag the items, or use the arrow buttons, to put them in order.
- The browser displays the page
- Routers forward the packets across the internet
- The server's response packets are reassembled in order by TCP
- The request is broken into packets addressed to the server
- DNS translates the domain name into an IP address
Question 25 of 20True or false
The World Wide Web and the internet are two names for the same thing.
Question 26 of 20What would you do?
What would you do?
A network has connections P–Q, Q–S, P–R, R–S and Q–R. What is the minimum number of connections that must fail before P can no longer reach S?
Question 27 of 20Choose one
Which statement best describes how TCP and IP work together?
Question 28 of 20Work it out
Four tasks take 60, 40, 30 and 30 seconds. Two processors run them in parallel, with 60 and 30 on one and 40 and 30 on the other. What is the parallel running time in seconds?
Question 29 of 20Work it out
A program takes 120 seconds sequentially and 40 seconds in parallel. What is the speedup?
Question 30 of 20Select all that apply
A new app tracks students' locations so parents can see where they are. Which are potential harms to consider? Select all that apply.
Select all that apply.
Question 31 of 20True or false
A machine learning program can produce biased results even if no programmer intended it, because it can learn patterns from biased training data.
Question 32 of 20Choose one
Which Creative Commons license lets others use and change a work for any purpose, including commercial, as long as they give credit?
Question 33 of 20Match the pairs
Match each threat to its description.
Tap an answer, then tap the place where it belongs (or drag it there).
- Phishing
- Ransomware
- Keylogger
- Rogue access point
Question 34 of 20Choose one