Everything below prints as one AP AP Computer Science Principles practice paper set: papers A & B with their answer keys, plus the full-length study package exam. Use the Download PDF / Print button (or Cmd/Ctrl+P) to save it.
Paper A
AP Computer Science Principles — Practice Paper A
Original unofficial practice questions · paper A · answer key on the last page
Total time: see section headers · No guessing penalty
| Section | Questions | Format |
|---|---|---|
| Section I: Multiple Choice | ||
| Create Performance Task |
Section I — Multiple Choice
An algorithm is a
A. step-by-step procedureB. type of storageC. networking protocolD. datatypeBinary uses only the digits
A. 0 and 1B. 1 and 2C. 0-9D. A-FHTTP is primarily used for
A. transferring web dataB. storing filesC. encrypting messagesD. printingEncryption converts data to
A. unreadable formB. larger textC. public IPsD. graphicsThe internet is best described as a
A. network of networksB. single serverC. databaseD. programAn IP address identifies a
A. device on a networkB. webpageC. passwordD. file typeCrowdsourcing means
A. getting contributions from many peopleB. automating dataC. hiring developersD. reducing storageBig data is characterized by
A. volume, velocity, varietyB. single clean datasetC. manual processingD. one providerA secure password is best protected by
A. being long, unique, and never sharedB. posting onlineC. using '1234'D. memorizing it looselyLossy compression
A. discards some data to shrink sizeB. grows filesC. adds metadataD. is losslessSection II — Free Response
Explain how a denial-of-service (DoS) attack affects a service, and describe one way to limit its impact.
4 points · rubric: Mechanism 2 pts, mitigation 2 pts.
Describe one computing innovation and analyze a beneficial and an unintended effect of it on society.
5 points · rubric: Innovation 1 pt, benefit 2 pts, unintended 2 pts.
Answer Key
1. step-by-step procedure — Sequence of steps.
2. 0 and 1 — Base-2 digits.
3. transferring web data — Web protocol.
4. unreadable form — Ciphertext.
5. network of networks — Interconnected networks.
6. device on a network — Device identifier.
7. getting contributions from many people — Open collaboration.
8. volume, velocity, variety — The 3Vs.
9. being long, unique, and never shared — Password hygiene.
10. discards some data to shrink size — Quality/size trade-off.
Free response — rubric notes
1. Mechanism 2 pts, mitigation 2 pts. · model: Overwhelms a server with traffic so legitimate users can't connect; mitigate by load balancing, filtering, and rate limiting.
2. Innovation 1 pt, benefit 2 pts, unintended 2 pts. · model: e.g., ride-sharing apps; convenience and efficiency; unintended: congestion rebound, driver-regulation and privacy concerns.
Paper B
AP Computer Science Principles — Practice Paper B
Original unofficial practice questions · paper B · answer key on the last page
Total time: see section headers · No guessing penalty
| Section | Questions | Format |
|---|---|---|
| Section I: Multiple Choice | ||
| Create Performance Task |
Section I — Multiple Choice
An algorithm is a
A. datatypeB. type of storageC. step-by-step procedureD. networking protocolBinary uses only the digits
A. 1 and 2B. 0-9C. A-FD. 0 and 1HTTP is primarily used for
A. storing filesB. transferring web dataC. printingD. encrypting messagesEncryption converts data to
A. graphicsB. public IPsC. unreadable formD. larger textThe internet is best described as a
A. databaseB. network of networksC. single serverD. programAn IP address identifies a
A. passwordB. file typeC. device on a networkD. webpageCrowdsourcing means
A. automating dataB. reducing storageC. hiring developersD. getting contributions from many peopleBig data is characterized by
A. one providerB. volume, velocity, varietyC. manual processingD. single clean datasetA secure password is best protected by
A. posting onlineB. using '1234'C. being long, unique, and never sharedD. memorizing it looselyLossy compression
A. grows filesB. is losslessC. adds metadataD. discards some data to shrink sizeSection II — Free Response
Explain how a denial-of-service (DoS) attack affects a service, and describe one way to limit its impact.
4 points · rubric: Mechanism 2 pts, mitigation 2 pts.
Describe one computing innovation and analyze a beneficial and an unintended effect of it on society.
5 points · rubric: Innovation 1 pt, benefit 2 pts, unintended 2 pts.
Answer Key
1. step-by-step procedure — Sequence of steps.
2. 0 and 1 — Base-2 digits.
3. transferring web data — Web protocol.
4. unreadable form — Ciphertext.
5. network of networks — Interconnected networks.
6. device on a network — Device identifier.
7. getting contributions from many people — Open collaboration.
8. volume, velocity, variety — The 3Vs.
9. being long, unique, and never shared — Password hygiene.
10. discards some data to shrink size — Quality/size trade-off.
Free response — rubric notes
1. Mechanism 2 pts, mitigation 2 pts. · model: Overwhelms a server with traffic so legitimate users can't connect; mitigate by load balancing, filtering, and rate limiting.
2. Innovation 1 pt, benefit 2 pts, unintended 2 pts. · model: e.g., ride-sharing apps; convenience and efficiency; unintended: congestion rebound, driver-regulation and privacy concerns.
Full-length study package exam
AP Computer Science Principles — Practice Exam
Section I: Multiple-Choice (70 Questions, 120 Minutes)
Instructions: Select the best answer for each question. For multiple-select questions, choose exactly two correct answers. Allow approximately 1 minute 43 seconds per question. An answer key with explanations is provided in a separate file.
Questions 1–10: Big Idea 1 — Creative Development
1. Which of the following is the primary benefit of using modular design in program development? A) Programs run faster
B) Programs use less memory
C) Programs are easier to understand, test, and modify
D) Programs require no debugging
2. A student is creating a program and notices that the output is consistently off by one. This is most likely a: A) Syntax error
B) Runtime error
C) Logic error (off-by-one error)
D) Hardware error
3. Which of the following is NOT part of the AP CSP Create Performance Task requirements? A) A procedure with at least one parameter
B) A list (collection)
C) A selection (IF statement)
D) User authentication (login system)
4. In pair programming, the role of the navigator is to: A) Type all the code
B) Review code, think strategically, and identify issues
C) Write the documentation
D) Test the program
5. Which of the following best describes an abstraction in programming? A) Writing detailed comments
B) Hiding implementation details behind a simpler interface
C) Creating multiple copies of the same code
D) Using as many variables as possible
6. What is the purpose of testing boundary values? A) To verify the program compiles correctly
B) To check behavior at the edges of valid input ranges where errors commonly occur
C) To ensure the program runs quickly
D) To verify the documentation is accurate
7. Which of the following is an example of top-down design? A) Combining small components into a larger system
B) Starting with the main problem and decomposing it into sub-problems
C) Writing all tests before writing code
D) Debugging the smallest functions first
8. Version control is most useful for: A) Running programs faster
B) Tracking code changes and enabling collaboration
C) Encrypting source code
D) Compressing files
9. A program has a syntax error. Which of the following will occur? A) The program runs but gives wrong results
B) The program crashes during execution
C) The program fails to compile or run at all
D) The program runs correctly
10. Documentation in a program includes: A) Only the user manual
B) Comments within the code and external documentation
C) Only comments at the top of the file
D) Only the README file
Questions 11–25: Big Idea 2 — Data
11. What is the decimal value of the binary number 10110? A) 20
B) 22
C) 24
D) 26
12. The hexadecimal number 3F in decimal is: A) 53
B) 63
C) 73
D) 43
13. Which of the following is true about lossless compression? A) It permanently removes some data
B) The original data can be perfectly reconstructed
C) It is used for JPEG images
D) It always reduces file size by exactly half
14. ASCII uses how many bits per character? A) 4 B) 7 C) 8 D) 16
15. A 1920×1080 pixel image with 24-bit color requires approximately how much storage? A) 2 MB
B) 6 MB
C) 12 MB
D) 24 MB
16. Run-length encoding (RLE) is an example of: A) Lossy compression
B) Lossless compression
C) Encryption
D) Decryption
17. Which data type would be used to represent a person's name in a program? A) Integer
B) Boolean
C) String
D) Float
18. An analog sound wave is converted to digital by: A) Encrypting it
B) Compressing it
C) Sampling it at regular intervals and recording amplitude values
D) Converting it to hexadecimal
19. Which of the following is metadata? A) The text content of an email
B) The timestamp and location data attached to a photograph
C) The pixels that make up a digital image
D) The audio data in an MP3 file
20. Data bias in machine learning can result from: A) Using too many data points
B) Training data that does not represent the population fairly
C) Using lossless compression
D) Encrypting the training data
21. What is the minimum number of bits needed to represent 100 unique values? A) 5 B) 6 C) 7 D) 8
22. A student compresses a photo using JPEG format. Later, the student cannot recover the original uncompressed photo. This is because: A) The file was encrypted
B) JPEG uses lossy compression
C) The file was deleted
D) JPEG uses lossless compression
23. Which of the following is the binary representation of the decimal number 42? A) 101010
B) 101001
C) 110100
D) 100101
24. A program needs to store a person's age. Which data type is most appropriate? A) String
B) Boolean
C) Integer
D) Float
25. Which of the following best describes the digital divide? A) The difference between public and private networks
B) The gap between those with and without access to computing technology
C) The separation between hardware and software
D) The difference between IPv4 and IPv6
Questions 26–50: Big Idea 3 — Algorithms and Programming
26. What is the value of 17 MOD 5? A) 2 B) 3 C) 5 D) 12
27. What does the following code display?
result ← 1
REPEAT 3 TIMES
{
result ← result + 2
}
DISPLAY(result)
A) 5 B) 7 C) 9 D) 3
28. In AP CSP pseudocode, list indices start at: A) 0 B) 1 C) -1
D) Any number
29. Which Boolean expression evaluates to TRUE when x is between 5 and 10, inclusive? A) (x > 5) AND (x < 10)
B) (x ≥ 5) AND (x ≤ 10)
C) (x ≥ 5) OR (x ≤ 10)
D) (x > 5) OR (x < 10)
30. A procedure that returns a value is also known as a: A) Loop
B) Function
C) Variable
D) Constant
31. What is the running time of a linear search on a list of n elements? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
32. What is the running time of binary search on a sorted list of n elements? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
33. Which of the following is NOT a required element for the Create Performance Task? A) Sequencing
B) Selection
C) Iteration
D) Recursion
34. What is displayed?
list ← [10, 20, 30, 40]
list[2] ← 25
DISPLAY(list[2])
A) 10
B) 20
C) 25
D) 30
35. A procedure doubleValue(x) takes a parameter x and returns x * 2. What is the value of doubleValue(doubleValue(3))? A) 6 B) 8 C) 9 D) 12
36. Which of the following problems is undecidable? A) Sorting a list of numbers
B) Finding the maximum value in a list
C) Determining whether any program will eventually stop running (Halting Problem)
D) Calculating the sum of a list
37. What is the value of NOT (FALSE AND TRUE)? A) TRUE
B) FALSE
C) An error
D) NULL
38. A library provides pre-written procedures for: A) Writing faster code
B) Avoiding the need to write common functionality from scratch
C) Encrypting all data automatically
D) Replacing the operating system
39. An API is: A) A type of computer hardware
B) A set of rules defining how programs can interact
C) A programming language
D) An encryption algorithm
40. Which loop type in AP CSP pseudocode always executes at least once? A) REPEAT n TIMES
B) FOR EACH
C) REPEAT UNTIL
D) All loops always execute at least once
41. String concatenation means: A) Finding the length of a string
B) Joining two strings together
C) Extracting a substring
D) Converting a string to a number
42. Which of the following running times grows fastest as n increases? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
E) O(2ⁿ)
43. A heuristic is: A) An algorithm that always finds the optimal solution
B) An approach that may not guarantee the best answer but is practical
C) A type of encryption
D) A data compression method
44. What value is stored in result after this code executes?
result ← 0
FOR EACH num IN [2, 4, 6, 8]
{
result ← result + num
}
A) 10
B) 20
C) 24
D) 8
45. Which of the following is true about a procedure with a parameter? A) It cannot return a value
B) It can only be called once
C) It can accept different input values each time it is called
D) It must use a loop
Questions 46–55: Big Idea 4 — Computing Systems and Networks
46. Which component of a computer executes instructions? A) RAM
B) Hard drive
C) CPU
D) GPU
47. The Internet uses which type of data transmission? A) Circuit switching
B) Packet switching
C) Message switching
D) Analog switching
48. HTTPS is more secure than HTTP because: A) It uses faster servers
B) It encrypts the data transmitted between browser and server
C) It uses shorter URLs
D) It blocks all advertisements
49. Which protocol translates domain names to IP addresses? A) HTTP
B) TCP
C) DNS
D) FTP
50. An IPv4 address consists of: A) 128 bits
B) 64 bits
C) 32 bits
D) 16 bits
51. A type of malware that encrypts files and demands payment is: A) A virus
B) A worm
C) Ransomware
D) Adware
52. Two-factor authentication improves security by requiring: A) Two passwords
B) Two forms of identification
C) Two computers
D) Two network connections
53. Which of the following is NOT a characteristic of the Internet's design? A) Decentralized
B) Packet switching
C) Single point of control
D) Fault tolerant
54. Redundancy in a computing system means: A) Having unnecessary code
B) Including backup components that can take over if primary components fail
C) Repeating the same calculation multiple times
D) Using both IPv4 and IPv6
55. Which of the following best describes a VPN? A) A type of computer virus
B) An encrypted tunnel for secure data transmission
C) A type of data compression
D) A programming language
Questions 56–70: Big Idea 5 — Impact of Computing
56. Which of the following is an example of a beneficial effect of social media? A) Cyberbullying
B) Misinformation spreading rapidly
C) Connecting people across geographic distances
D) Privacy loss
57. A student's digital footprint includes: A) Only what they intentionally post online
B) Both active data they share and passive data collected about them
C) Only their search history
D) Only their social media posts
58. Which licensing system allows creators to specify how their work can be used while retaining some rights? A) Patent
B) Copyright
C) Creative Commons
D) Trademark
59. Open source software is software whose: A) Source code is publicly available for viewing and modification
B) Source code is encrypted
C) Developers are anonymous
D) Code cannot be modified
60. An unintended consequence of a computing innovation is: A) A planned feature of the innovation
B) A negative outcome that was not anticipated by the creators
C) A syntax error in the code
D) A runtime error
61. Citizen science involves: A) Only professional scientists
B) Members of the public participating in scientific research
C) Scientists working in isolation
D) Government-controlled research
62. Which of the following is a concern related to big data and machine learning? A) It uses too little data
B) Biased training data can lead to biased algorithmic outputs
C) It is always accurate
D) It cannot be used for predictions
63. Fair use allows: A) Unlimited use of copyrighted material
B) Limited use of copyrighted material without permission for specific purposes
C) Using any software without paying
D) Copying entire books
64. The digital divide can be addressed by: A) Ignoring it
B) Investing in broadband infrastructure and digital literacy education
C) Restricting internet access
D) Making all software proprietary
65. A computing innovation that collects user location data without clear disclosure raises concerns about: A) Open source licensing
B) Data privacy
C) Public key encryption
D) Packet switching
66. Which of the following is an example of crowdsourcing? A) A company developing software internally
B) Waze using traffic data from its users to provide real-time navigation
C) A student writing an essay
D) A researcher working alone in a lab
67. Algorithmic bias is best described as: A) A preference for certain programming languages
B) Systematic unfairness in algorithmic outputs, often due to biased data or design
C) The speed difference between algorithms
D) Errors caused by syntax mistakes
68. Which of the following is true about digital data? A) It is always private
B) It is persistent and difficult to completely delete
C) It automatically expires after one year
D) It cannot be copied
69. A student wants to use an image found online in a school project. Under which concept can they use the image without permission for educational purposes? A) Patent law
B) Trademark law
C) Fair use
D) Trade secret law
70. Which of the following is the most effective strategy for a person to manage their digital footprint? A) Never using any digital technology
B) Being mindful about what they share online and reviewing privacy settings
C) Deleting all social media accounts
D) Using a fake name for everything
Answer Recording Sheet
Use this section to record your answers before checking the answer key.
| Question | Answer | Question | Answer | Question | Answer |
|---|---|---|---|---|---|
| 1 | 11 | 21 | |||
| 2 | 12 | 22 | |||
| 3 | 13 | 23 | |||
| 4 | 14 | 24 | |||
| 5 | 15 | 25 | |||
| 6 | 16 | 26 | |||
| 7 | 17 | 27 | |||
| 8 | 18 | 28 | |||
| 9 | 19 | 29 | |||
| 10 | 20 | 30 |
| Question | Answer | Question | Answer | Question | Answer |
|---|---|---|---|---|---|
| 31 | 41 | 51 | |||
| 32 | 42 | 52 | |||
| 33 | 43 | 53 | |||
| 34 | 44 | 54 | |||
| 35 | 45 | 55 | |||
| 36 | 46 | 56 | |||
| 37 | 47 | 57 | |||
| 38 | 48 | 58 | |||
| 39 | 49 | 59 | |||
| 40 | 50 | 60 |
| Question | Answer | Question | Answer |
|---|---|---|---|
| 61 | 66 | ||
| 62 | 67 | ||
| 63 | 68 | ||
| 64 | 69 | ||
| 65 | 70 |
Check your answers in the companion file: 11-Practice-Exam-Answers.md
Answer Key & Rubric
AP Computer Science Principles — Practice Exam with Answers
Section I: Multiple-Choice (70 Questions, 120 Minutes)
Questions 1–10: Big Idea 1 — Creative Development
1. Which of the following is the primary benefit of using modular design in program development? A) Programs run faster
B) Programs use less memory
C) Programs are easier to understand, test, and modify
D) Programs require no debugging
E) Programs do not need documentation
Answer: C. Modularity divides a program into self-contained modules, making each easier to understand, test, debug, and modify independently.
2. A student is creating a program and notices that the output is consistently off by one. This is most likely a: A) Syntax error
B) Runtime error
C) Logic error (off-by-one error)
D) Hardware error
E) Network error
Answer: C. An off-by-one error is a common logic error where a loop iterates one too many or one too few times, or an array index is incorrect by one.
3. Which of the following is NOT part of the AP CSP Create Performance Task requirements? A) A procedure with at least one parameter
B) A list (collection)
C) A selection (IF statement)
D) User authentication (login system)
E) An iteration (loop)
Answer: D. User authentication is not a Create Task requirement.
4. In pair programming, the role of the navigator is to: A) Type all the code
B) Review code, think strategically, and identify issues
C) Write the documentation
D) Test the program
E) Design the user interface
Answer: B. The navigator reviews each line of code, thinks strategically about the overall direction, and identifies potential issues.
5. Which of the following best describes an abstraction in programming? A) Writing detailed comments
B) Hiding implementation details behind a simpler interface
C) Creating multiple copies of the same code
D) Using as many variables as possible
E) Deleting unused code
Answer: B. Abstraction hides complexity and implementation details, exposing only the essential features through a simplified interface.
6. What is the purpose of testing boundary values? A) To verify the program compiles correctly
B) To check behavior at the edges of valid input ranges where errors commonly occur
C) To ensure the program runs quickly
D) To verify the documentation is accurate
E) To check the program's user interface
Answer: B. Boundary values test the edges of valid ranges (e.g., 0, 1, max, min) where off-by-one and edge case errors commonly occur.
7. Which of the following is an example of top-down design? A) Combining small components into a larger system
B) Starting with the main problem and decomposing it into sub-problems
C) Writing all tests before writing code
D) Debugging the smallest functions first
E) Optimizing code before it works correctly
Answer: B. Top-down design starts with the overall problem and breaks it into smaller, manageable sub-problems.
8. Version control is most useful for: A) Running programs faster
B) Tracking code changes and enabling collaboration
C) Encrypting source code
D) Compressing files
E) Designing user interfaces
Answer: B. Version control tracks changes to code over time, enabling collaboration and the ability to revert to previous versions.
9. A program has a syntax error. Which of the following will occur? A) The program runs but gives wrong results
B) The program crashes during execution
C) The program fails to compile or run at all
D) The program runs correctly
E) The program displays a warning but continues
Answer: C. Syntax errors prevent the program from compiling or running.
10. Documentation in a program includes: A) Only the user manual
B) Comments within the code and external documentation
C) Only comments at the top of the file
D) Only the README file
E) Only error messages
Answer: B. Documentation includes both internal documentation (comments) and external documentation (user manuals, API docs, README files).
Questions 11–25: Big Idea 2 — Data
11. What is the decimal value of the binary number 10110? A) 20
B) 22
C) 24
D) 26
E) 28
Answer: B. 10110 = 16 + 0 + 4 + 2 + 0 = 22.
12. The hexadecimal number 3F in decimal is: A) 53
B) 63
C) 73
D) 43
E) 83
Answer: B. 3F = 3×16 + 15 = 48 + 15 = 63.
13. Which of the following is true about lossless compression? A) It permanently removes some data
B) The original data can be perfectly reconstructed
C) It is used for JPEG images
D) It always reduces file size by exactly half
E) It is primarily used for audio files
Answer: B. Lossless compression allows perfect reconstruction of the original data.
14. ASCII uses how many bits per character? A) 4 B) 7 C) 8 D) 16
E) 32
Answer: B. ASCII uses 7 bits per character, allowing 128 unique characters.
15. A 1920×1080 pixel image with 24-bit color requires approximately how much storage? A) 2 MB
B) 6 MB
C) 12 MB
D) 24 MB
E) 48 MB
Answer: B. 1920 × 1080 × 3 bytes ≈ 6,220,800 bytes ≈ 6 MB.
16. Run-length encoding (RLE) is an example of: A) Lossy compression
B) Lossless compression
C) Encryption
D) Decryption
E) Data mining
Answer: B. RLE is a lossless compression technique.
17. Which data type would be used to represent a person's name in a program? A) Integer
B) Boolean
C) String
D) Float
E) Binary
Answer: C. A string (text) data type is used to represent text characters like names.
18. An analog sound wave is converted to digital by: A) Encrypting it
B) Compressing it
C) Sampling it at regular intervals and recording amplitude values
D) Converting it to hexadecimal
E) Splitting it into packets
Answer: C. Analog-to-digital conversion involves sampling the wave at regular intervals and recording the amplitude as binary numbers.
19. Which of the following is metadata? A) The text content of an email
B) The timestamp and location data attached to a photograph
C) The pixels that make up a digital image
D) The audio data in an MP3 file
E) The source code of a program
Answer: B. Metadata is data about data — timestamps, location data, file size, camera settings, etc.
20. Data bias in machine learning can result from: A) Using too many data points
B) Training data that does not represent the population fairly
C) Using lossless compression
D) Encrypting the training data
E) Using binary search instead of linear search
Answer: B. Data bias occurs when training data reflects or amplifies existing societal biases.
21. What is the minimum number of bits needed to represent 100 unique values? A) 5 B) 6 C) 7 D) 8 E) 10
Answer: C. 2^6 = 64 (not enough), 2^7 = 128 (enough). So 7 bits are needed.
22. A student compresses a photo using JPEG format. Later, the student cannot recover the original uncompressed photo. This is because: A) The file was encrypted
B) JPEG uses lossy compression
C) The file was deleted
D) JPEG uses lossless compression
E) The file was too large
Answer: B. JPEG uses lossy compression, which permanently removes data.
23. Which of the following is the binary representation of the decimal number 42? A) 101010
B) 101001
C) 110100
D) 100101
E) 111010
Answer: A. 42 = 32 + 8 + 2 = 101010 in binary.
24. A program needs to store a person's age. Which data type is most appropriate? A) String
B) Boolean
C) Integer
D) Float
E) List
Answer: C. Age is a whole number, making integer the most appropriate type.
25. Which of the following best describes the digital divide? A) The difference between public and private networks
B) The gap between those with and without access to computing technology
C) The separation between hardware and software
D) The difference between IPv4 and IPv6
E) The gap between open source and proprietary software
Answer: B.
Questions 26–50: Big Idea 3 — Algorithms and Programming
26. What is the value of 17 MOD 5? A) 2 B) 3 C) 5 D) 12
E) 17
Answer: B. 17 ÷ 5 = 3 remainder 2. So 17 MOD 5 = 2. Correction: 17 ÷ 5 = 3 with remainder 2. The answer is A) 2.
27. What does the following code display?
result ← 1
REPEAT 3 TIMES
{
result ← result + 2
}
DISPLAY(result)
A) 5 B) 7 C) 9 D) 3 E) 6
Answer: B. Start: 1. After 1st: 3. After 2nd: 5. After 3rd: 7.
28. In AP CSP pseudocode, list indices start at: A) 0 B) 1 C) -1
D) Any number
E) It depends on the list
Answer: B. AP CSP lists are 1-indexed (start at 1), unlike most programming languages which are 0-indexed.
29. Which Boolean expression evaluates to TRUE when x is between 5 and 10, inclusive? A) (x > 5) AND (x < 10)
B) (x ≥ 5) AND (x ≤ 10)
C) (x ≥ 5) OR (x ≤ 10)
D) (x > 5) OR (x < 10)
E) NOT (x < 5) AND NOT (x > 10)
Answer: B. We need x ≥ 5 AND x ≤ 10 to include the endpoints.
30. A procedure that returns a value is also known as a: A) Loop
B) Function
C) Variable
D) Constant
E) Parameter
Answer: B. A procedure that returns a value is commonly called a function.
31. What is the running time of a linear search on a list of n elements? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
E) O(2ⁿ)
Answer: C. Linear search examines each element in the worst case, giving O(n) running time.
32. What is the running time of binary search on a sorted list of n elements? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
E) O(2ⁿ)
Answer: B. Binary search eliminates half the elements with each comparison, giving O(log n).
33. Which of the following is NOT a required element for the Create Performance Task? A) Sequencing
B) Selection
C) Iteration
D) Recursion
E) A procedure with a parameter
Answer: D. Recursion is not required for the Create Task.
34. What is displayed?
list ← [10, 20, 30, 40]
list[2] ← 25
DISPLAY(list[2])
A) 10
B) 20
C) 25
D) 30
E) 40
Answer: C. The second element is changed from 20 to 25, then displayed.
35. A procedure doubleValue(x) takes a parameter x and returns x * 2. What is the value of doubleValue(doubleValue(3))? A) 6 B) 8 C) 9 D) 12
E) 3
Answer: D. Inner call: doubleValue(3) = 6. Outer call: doubleValue(6) = 12.
36. Which of the following problems is undecidable? A) Sorting a list of numbers
B) Finding the maximum value in a list
C) Determining whether any program will eventually stop running (Halting Problem)
D) Calculating the sum of a list
E) Searching for a value in a sorted list
Answer: C. The Halting Problem is a classic undecidable problem — no algorithm can determine whether any arbitrary program will halt.
37. What is the value of NOT (FALSE AND TRUE)? A) TRUE
B) FALSE
C) An error
D) NULL
E) Undefined
Answer: A. FALSE AND TRUE = FALSE. NOT FALSE = TRUE.
38. A library provides pre-written procedures for: A) Writing faster code
B) Avoiding the need to write common functionality from scratch
C) Encrypting all data automatically
D) Replacing the operating system
E) Hardware maintenance
Answer: B. Libraries provide pre-written code for common tasks, saving development time and reducing errors.
39. An API is: A) A type of computer hardware
B) A set of rules defining how programs can interact
C) A programming language
D) An encryption algorithm
E) A compression format
Answer: B. An API (Application Programming Interface) defines how programs can interact with each other or with services.
40. Which loop type in AP CSP pseudocode always executes at least once? A) REPEAT n TIMES
B) FOR EACH
C) REPEAT UNTIL
D) All loops always execute at least once
E) No loop always executes at least once
Answer: C. REPEAT UNTIL checks the condition AFTER each iteration, so it always runs at least once.
41. String concatenation means: A) Finding the length of a string
B) Joining two strings together
C) Extracting a substring
D) Converting a string to a number
E) Comparing two strings
Answer: B. Concatenation joins strings together.
42. Which of the following running times grows fastest as n increases? A) O(1)
B) O(log n)
C) O(n)
D) O(n²)
E) O(2ⁿ)
Answer: E. Exponential time O(2ⁿ) grows fastest, quickly becoming impractical for large n.
43. A heuristic is: A) An algorithm that always finds the optimal solution
B) An approach that may not guarantee the best answer but is practical
C) A type of encryption
D) A data compression method
E) A type of loop
Answer: B. A heuristic is a practical approach that may not guarantee the correct/optimal answer but is useful when perfect solutions are impractical.
44. What value is stored in result after this code executes?
result ← 0
FOR EACH num IN [2, 4, 6, 8]
{
result ← result + num
}
A) 10
B) 20
C) 24
D) 8 E) 4
Answer: B. result = 2 + 4 + 6 + 8 = 20.
45. Which of the following is true about a procedure with a parameter? A) It cannot return a value
B) It can only be called once
C) It can accept different input values each time it is called
D) It must use a loop
E) It must contain an IF statement
Answer: C. Parameters allow a procedure to accept different input values each time it is called.
Questions 46–55: Big Idea 4 — Computing Systems and Networks
46. Which component of a computer executes instructions? A) RAM
B) Hard drive
C) CPU
D) GPU
E) Motherboard
Answer: C. The CPU (Central Processing Unit) executes instructions.
47. The Internet uses which type of data transmission? A) Circuit switching
B) Packet switching
C) Message switching
D) Analog switching
E) Serial switching
Answer: B. The Internet uses packet switching.
48. HTTPS is more secure than HTTP because: A) It uses faster servers
B) It encrypts the data transmitted between browser and server
C) It uses shorter URLs
D) It blocks all advertisements
E) It compresses all data
Answer: B. HTTPS uses encryption (TLS/SSL) to protect data in transit.
49. Which protocol translates domain names to IP addresses? A) HTTP
B) TCP
C) DNS
D) FTP
E) SMTP
Answer: C. DNS translates domain names to IP addresses.
50. An IPv4 address consists of: A) 128 bits
B) 64 bits
C) 32 bits
D) 16 bits
E) 256 bits
Answer: C. IPv4 uses 32-bit addresses.
51. A type of malware that encrypts files and demands payment is: A) A virus
B) A worm
C) Ransomware
D) Adware
E) Spyware
Answer: C. Ransomware encrypts the victim's files and demands payment for the decryption key.
52. Two-factor authentication improves security by requiring: A) Two passwords
B) Two forms of identification
C) Two computers
D) Two network connections
E) Two email addresses
Answer: B. Two-factor authentication requires two different forms of identification (e.g., password + phone code).
53. Which of the following is NOT a characteristic of the Internet's design? A) Decentralized
B) Packet switching
C) Single point of control
D) Fault tolerant
E) Uses protocols
Answer: C. The Internet is decentralized — there is no single point of control.
54. Redundancy in a computing system means: A) Having unnecessary code
B) Including backup components that can take over if primary components fail
C) Repeating the same calculation multiple times
D) Using both IPv4 and IPv6
E) Compressing all data twice
Answer: B. Redundancy means including backup components or data for fault tolerance.
55. Which of the following best describes a VPN? A) A type of computer virus
B) An encrypted tunnel for secure data transmission
C) A type of data compression
D) A programming language
E) A type of computer hardware
Answer: B. A VPN (Virtual Private Network) creates an encrypted tunnel for secure data transmission.
Questions 56–70: Big Idea 5 — Impact of Computing
56. Which of the following is an example of a beneficial effect of social media? A) Cyberbullying
B) Misinformation spreading rapidly
C) Connecting people across geographic distances
D) Privacy loss
E) Addiction
Answer: C. Social media connects people across distances, which is a beneficial effect.
57. A student's digital footprint includes: A) Only what they intentionally post online
B) Both active data they share and passive data collected about them
C) Only their search history
D) Only their social media posts
E) Only data from the past 30 days
Answer: B. A digital footprint includes both active (intentionally shared) and passive (collected without explicit action) data.
58. Which licensing system allows creators to specify how their work can be used while retaining some rights? A) Patent
B) Copyright
C) Creative Commons
D) Trademark
E) Trade secret
Answer: C. Creative Commons licenses allow creators to specify usage terms.
59. Open source software is software whose: A) Source code is publicly available for viewing and modification
B) Source code is encrypted
C) Developers are anonymous
D) Code cannot be modified
E) Code is owned by a single company
Answer: A. Open source software has publicly available source code.
60. An unintended consequence of a computing innovation is: A) A planned feature of the innovation
B) A negative outcome that was not anticipated by the creators
C) A syntax error in the code
D) A runtime error
E) A feature requested by users
Answer: B. Unintended consequences are negative outcomes not anticipated by the innovators.
61. Citizen science involves: A) Only professional scientists
B) Members of the public participating in scientific research
C) Scientists working in isolation
D) Government-controlled research
E) Only university researchers
Answer: B. Citizen science involves public participation in scientific research.
62. Which of the following is a concern related to big data and machine learning? A) It uses too little data
B) Biased training data can lead to biased algorithmic outputs
C) It is always accurate
D) It cannot be used for predictions
E) It requires no computing power
Answer: B. Biased training data is a major concern, as it leads to biased algorithmic outputs.
63. Fair use allows: A) Unlimited use of copyrighted material
B) Limited use of copyrighted material without permission for specific purposes
C) Using any software without paying
D) Copying entire books
E) Ignoring all copyright laws
Answer: B. Fair use allows limited use of copyrighted material for purposes like criticism, commentary, and education.
64. The digital divide can be addressed by: A) Ignoring it
B) Investing in broadband infrastructure and digital literacy education
C) Restricting internet access
D) Making all software proprietary
E) Increasing the cost of devices
Answer: B. Addressing the digital divide requires investment in infrastructure, affordable access, and digital literacy education.
65. A computing innovation that collects user location data without clear disclosure raises concerns about: A) Open source licensing
B) Data privacy
C) Public key encryption
D) Packet switching
E) Lossy compression
Answer: B. Collecting user data without disclosure is a data privacy concern.
66. Which of the following is an example of crowdsourcing? A) A company developing software internally
B) Waze using traffic data from its users to provide real-time navigation
C) A student writing an essay
D) A researcher working alone in a lab
E) A government classifying information
Answer: B. Waze crowdsources traffic data from its users.
67. Algorithmic bias is best described as: A) A preference for certain programming languages
B) Systematic unfairness in algorithmic outputs, often due to biased data or design
C) The speed difference between algorithms
D) Errors caused by syntax mistakes
E) The use of random numbers in algorithms
Answer: B.
68. Which of the following is true about digital data? A) It is always private
B) It is persistent and difficult to completely delete
C) It automatically expires after one year
D) It cannot be copied
E) It is always encrypted
Answer: B. Digital data is persistent — it is very difficult to completely delete once published or collected.
69. A student wants to use an image found online in a school project. Under which concept can they use the image without permission for educational purposes? A) Patent law
B) Trademark law
C) Fair use
D) Trade secret law
E) Criminal law
Answer: C. Fair use allows limited use of copyrighted material for educational purposes.
70. Which of the following is the most effective strategy for a person to manage their digital footprint? A) Never using any digital technology
B) Being mindful about what they share online and reviewing privacy settings
C) Deleting all social media accounts
D) Using a fake name for everything
E) Sharing as much as possible
Answer: B. Being mindful about what is shared and regularly reviewing privacy settings is the most practical and effective strategy.