Semester Exam — Version B
40 questions · Mark your answers on the printed answer sheet
Directions
- Record every answer on your printed answer sheet — do not type anything here.
- Choose the single best answer for each question. Each is worth 1 point; there is no penalty for guessing, so answer all 40.
- For Part 3 (pseudocode), remember the AP CSP notation: ← is assignment, lists are 1-indexed, and MOD is the remainder.
1 Which of the following best describes the relationship between the Internet and the World Wide Web?
- A. They are two different names for the same global network.
- B. The Internet is a service that runs on top of the World Wide Web.
- C. The World Wide Web is a service that runs on top of the Internet.
- D. The Internet is the software, and the World Wide Web is the hardware.
2 Which of the following uses the Internet but is not part of the World Wide Web?
- A. Sending an email using SMTP
- B. Loading
https://example.comin a web browser - C. Clicking a hyperlink that connects two web pages
- D. Reading a news website in Chrome
3 A large file is sent from one computer to another over the Internet. Which best describes how the data travels?
- A. As one continuous stream that follows a single fixed path.
- B. Broken into packets that all follow the same path and arrive in order.
- C. Copied to every router on the network so the destination can pick it up.
- D. Broken into packets that may take different paths and arrive out of order, then reassembled at the destination.
4 In addition to a chunk of the data being sent, what does each packet contain?
- A. A complete copy of the entire file.
- B. Routing metadata such as source address, destination address, and sequence information.
- C. A copy of every other packet in the transmission.
- D. The sender's username and password.
5 Which of the following best explains why the Internet is considered fault tolerant?
- A. Every device on the Internet is required to have backup power.
- B. Every packet is duplicated, so if one is lost the other arrives.
- C. There are multiple redundant paths between most points, and routing can adapt when a path fails.
- D. The Internet is owned by a single organization that monitors all hardware.
6 Including extra network components, such as alternate routing paths, that can be used if a primary component fails is known as:
- A. Latency
- B. Bandwidth
- C. Encryption
- D. Redundancy
7 A web browser needs to find the IP address that corresponds to wikipedia.org. Which protocol performs this lookup?
- A. DNS
- B. HTTP
- C. UDP
- D. TCP
8 Which two protocols work together to break a message into packets, address and route them across networks, and reassemble them in order at the destination?
- A. HTTP and HTTPS
- B. TCP and IP
- C. DNS and IP
- D. UDP and DNS
9 A live online game needs data delivered as fast as possible and can tolerate a small amount of lost data. Which protocol is the best fit?
- A. TCP, because it confirms and re-sends every lost packet.
- B. DNS, because it streams data continuously.
- C. HTTPS, because it is encrypted.
- D. UDP, because it is faster and does not wait to confirm delivery.
10 What does HTTPS add compared to plain HTTP?
- A. Faster downloads.
- B. A guarantee that the website is honest and accurate.
- C. Encryption of the data exchanged between the browser and the server.
- D. A larger pool of IP addresses.
11 What is the primary reason the Internet is transitioning from IPv4 to IPv6?
- A. IPv6 provides a much larger address space, allowing many more connected devices.
- B. IPv6 is encrypted, while IPv4 is not.
- C. IPv6 packets are smaller, so they travel faster.
- D. IPv4 has been retired and no longer works on modern networks.
12 Internet protocols such as TCP/IP and HTTP are open standards. Why does this matter?
- A. It keeps the Internet owned and controlled by one company.
- B. It makes every connection automatically encrypted.
- C. It guarantees that every website is trustworthy.
- D. It lets devices made by any manufacturer communicate with one another.
13 A user reports that videos take a long time to start playing, even though once they begin they play smoothly in high quality. The long startup delay is best described as a problem of:
- A. Latency
- B. Bandwidth
- C. Encryption
- D. Redundancy
14 Which statement about the Internet is true?
- A. It is owned and controlled by a single company or government.
- B. The Internet and the World Wide Web are identical.
- C. It is a network of networks with no single owner, connected by shared open protocols.
- D. Data always travels along one fixed, pre-assigned path.
15 Encryption is best defined as:
- A. Permanently deleting data so no one can read it.
- B. Copying data to a backup server.
- C. Compressing data to make it smaller.
- D. Encoding data so that only authorized parties can read it.
16 In symmetric encryption, how are keys used?
- A. A public key encrypts and a separate private key decrypts.
- B. No keys are needed at all.
- C. One shared key both encrypts and decrypts the message.
- D. A brand-new certificate is created for every message.
17 Alice sends Bob an encrypted message using public-key (asymmetric) encryption. Which key does Bob use to decrypt the message?
- A. Alice's public key
- B. Bob's private key
- C. Alice's private key
- D. Bob's public key
18 What is the primary advantage of public-key (asymmetric) encryption compared to symmetric encryption?
- A. Two parties can communicate securely without first exchanging a secret key.
- B. It is mathematically faster than symmetric encryption.
- C. It produces shorter encrypted messages.
- D. It cannot be broken by any computer, no matter how powerful.
19 What is the purpose of a digital certificate?
- A. To encrypt the data being sent between two computers.
- B. To make the connection faster.
- C. To store the user's password securely.
- D. To vouch that a particular public key really belongs to a particular website.
20 Who issues a digital certificate?
- A. The website's own server.
- B. The user's web browser.
- C. A trusted third party called a Certificate Authority (CA).
- D. The user's Internet Service Provider.
21 A user sees https:// and a padlock icon in the browser. Which of the following is guaranteed by HTTPS?
- A. Data exchanged between the browser and the server is encrypted in transit.
- B. The website's content is accurate and trustworthy.
- C. The website cannot have been hacked or compromised.
- D. The user's identity is hidden from the website's owner.
22 Which of the following is NOT an example of multi-factor authentication (MFA)?
- A. Entering a password and then approving a notification on a phone app.
- B. Entering a password and then waiting through a 30-second lockout delay after typos.
- C. Entering a PIN and then scanning a fingerprint.
- D. Inserting a USB security key and then typing a password.
23 A student logs in by typing a password and then entering a 6-digit code texted to their phone. Which two authentication factors are being used?
- A. Something you know + something you are
- B. Something you have + something you are
- C. Something you know + something you know
- D. Something you know + something you have
24 An attacker sets up a Wi-Fi hotspot in an airport named "Airport_Free_WiFi" so travelers connect to it instead of the real network, allowing the attacker to read their unencrypted traffic. This attack is best described as:
- A. Phishing
- B. A rogue access point
- C. A keylogger
- D. A computer virus
25 A user receives an email that looks like it is from their bank, warning of "suspicious activity" and asking them to click a link and log in to verify their account. The link leads to a convincing fake site that captures their password. This is an example of:
- A. A worm
- B. Phishing
- C. A rogue access point
- D. A keylogger
26 Which statement best distinguishes a worm from a virus?
- A. A virus spreads on its own; a worm needs a host file and user action.
- B. They are two different names for exactly the same thing.
- C. A worm is a piece of hardware; a virus is software.
- D. A worm self-replicates and spreads on its own; a virus needs a host file and user action to spread.
27 Which combination of data is most likely to uniquely identify a specific individual, even though no single item is a strong identifier by itself?
- A. The person's ZIP code, date of birth, and gender.
- B. A list of the websites the person visits most often.
- C. The person's preferred display language and time zone.
- D. The person's screen resolution and device type.
28 In AP CSP pseudocode, what does the symbol ← (left arrow) do?
- A. Tests whether two values are equal.
- B. Displays a value on the screen.
- C. Stores the value on the right into the variable on the left.
- D. Ends the program.
29 What does the expression x = 5 evaluate to in AP CSP pseudocode?
- A. It stores the value 5 in x.
- B. true or false, depending on whether x equals 5.
- C. The number 5 every time.
- D. An error.
30 What does 17 MOD 5 evaluate to?
- A. 2
- B. 3
- C. 3.4
- D. 5
31 RANDOM(1, 4) could return which values?
- A. 1, 2, or 3
- B. 2, 3, or 4
- C. 1, 2, 3, or 4
- D. Any decimal between 1 and 4
32 Which expression evaluates to true only when x is between 50 and 80, inclusive?
- A. (x ≤ 50) AND (x ≥ 80)
- B. (x ≥ 50) AND (x ≤ 80)
- C. (x ≥ 50) OR (x ≤ 80)
- D. (x > 50) AND (x < 80)
33 The expression a OR b evaluates to true when:
- A. Both a and b are true, and only then.
- B. Exactly one of a or b is true.
- C. Neither a nor b is true.
- D. At least one of a or b is true (including when both are true).
34 How is an IF / ELSE different from two separate IF statements?
- A. An IF / ELSE always runs exactly one of its two blocks; two separate IFs can both run or both be skipped.
- B. They behave exactly the same way.
- C. Two separate IF statements always run both of their blocks.
- D. An IF / ELSE cannot contain any statements.
35 A REPEAT UNTIL(condition) loop keeps running its block until:
- A. the condition becomes false.
- B. the condition becomes true.
- C. it has run exactly 10 times.
- D. never — it loops forever.
36 Given aList ← [10, 20, 30], what is the value of aList[1]?
- A. 20
- B. 30
- C. 10
- D. An error — there is no index 1.
37 For any list aList, which expression always gives the last element?
- A. aList[0]
- B. aList[LENGTH(aList) + 1]
- C. aList[last]
- D. aList[LENGTH(aList)]
38 If aList is [10, 20, 30], then FOR EACH item IN aList assigns item the values:
- A. 10, 20, 30 (the values)
- B. 1, 2, 3 (the indices)
- C. only 30 (the last value)
- D. 0, 1, 2
39 What does the following program display?
x ← 3
y ← 5
REPEAT 3 TIMES
{
x ← x + y
y ← y - 1
}
DISPLAY(x)
- A. 11
- B. 15
- C. 8
- D. 18
40 What happens when a RETURN statement runs inside a procedure?
- A. It prints the value to the screen and keeps running the procedure.
- B. It restarts the procedure from the top.
- C. It immediately exits the procedure and sends the value back to whoever called it.
- D. It is ignored unless it is the very last line.
— End of Exam (Version B) —
Make sure every answer is marked on your printed answer sheet.
Back to Semester Exam