Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
45 views37 pages

AP Computer Science Principles-EXAM2-5 Steps To A 5-MCQ

The document is an AP Computer Science Principles Practice Exam consisting of multiple-choice questions that assess various concepts in computer science. It includes instructions for answering the questions, a reference sheet, and a variety of topics such as data representation, programming concepts, and cybersecurity. The exam is designed to simulate the actual AP exam experience and contains 70 questions, with specific guidelines for answering and scoring.

Uploaded by

aboodsmadimh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views37 pages

AP Computer Science Principles-EXAM2-5 Steps To A 5-MCQ

The document is an AP Computer Science Principles Practice Exam consisting of multiple-choice questions that assess various concepts in computer science. It includes instructions for answering the questions, a reference sheet, and a variety of topics such as data representation, programming concepts, and cybersecurity. The exam is designed to simulate the actual AP exam experience and contains 70 questions, with specific guidelines for answering and scoring.

Uploaded by

aboodsmadimh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

AP Computer Science Principles Practice Exam 1

Multiple-Choice Questions
ANSWER SHEET
AP Computer Science Principles Practice Exam 1

Multiple-Choice Questions

Time: 2 hours
Number of questions: 70
The multiple-choice questions represent 70% of your total score.

Directions: Choose the one best answer for each question. The last eight
questions of the test have two correct answers; for these, you will be
instructed to choose two answer choices.
Tear out the answer sheet on the previous page and grid in your answers
using a pencil. Consider how much time you have left before spending too
much time on any one problem.

AP Computer Science Principles Exam Reference Sheet


On the AP Computer Science Principles exam, you will be given a
reference sheet to use while you’re taking the multiple-choice test. A
copy of this six-page reference sheet is included in the Appendix of this
book (reprinted by permission from the College Board).
To make taking this practice test like taking the actual exam, you should
tear out the reference sheet so you can easily refer to it while taking the
test. Save these reference pages since you’ll need to use them when you
take AP Computer Science Principles Practice Exam 2.
If you lose the pages, the reference sheet is also available near the end of
the PDF publication “AP Computer Science Principles Student
Handouts” on the College Board website. Here is the URL:

https://apcentral.collegeboard.org/pdf/ap-csp-student-task-directions.pdf?
course=ap-computer-science-principles
1. You won the lottery and elected to receive a lump sum! The largest
number the bank’s computer can store is 231 - 1, or 2,147,483,647.
After depositing your lottery winnings of $2,500,000,000, what will the
result be?
(A) Your winnings were more than the largest number the bank’s
computers could hold, so an overflow error will occur.
(B) Since decimal numbers are stored imprecisely in computers, a
rounding error will occur.
(C) The amount will be represented in machine code format, so
converting it to decimal will show the balance in a more readable
format.
(D) The amount will cause a runtime error.
2. You stop by and purchase your favorite snack after school one day. You
notice the cash register shows the change you are owed as $0.04999999
rather than $0.05. How is this possible?
(A) The cash register DISPLAY procedure has an error.
(B) A rounding error occurred.
(C) It’s displaying the change owed in a different currency.
(D) The amount is represented as a string field rather than a number.
3. You are assigned a parking space in a large parking lot by an automated
machine. You recognize that the parking space number is displayed in
binary, but the parking spots are labeled in decimal numbers. Convert
the parking space number 10011011 to decimal to know where to park
and avoid getting towed.
(A) 154
(B) 155
(C) 157
(D) 9F
4. When designing a web page, you see a color you want to use listed in
binary as: 01010000, 11001000, 01111000. Which color is it, given the
decimal equivalents (red, green, blue)?
(A) (32, 76, 414)
(B) (50, 118, 78)
(C) (80, 200, 120)
(D) (128, 310, 170)
5. Your bank asks for your phone number to associate it with your
account. What is this an example of?
(A) A privacy concern
(B) Multifactor authentication
(C) A phishing attempt
(D) Asymmetric authentication
6. You have to change a program written a year ago by someone else. A
sample section of code is below. How could the original program
author have helped anyone making changes at a later date?

(A) Provided the original program requirements


(B) Added a video describing the program design and functionality
(C) Used procedure and variable names that described their purpose
and content
(D) Provided written documentation of the application development
process

Questions 7–8 are based on the code below. Assume all lists and
variables have been properly initialized.
7. What does the code do?
(A) Plays a song from the playlist.
(B) If a song requested by the user is in the playlist, plays it;
otherwise adds it to the end of the playlist and then plays it.
(C) Moves a song from its current position in the playlist to the end of
it, then plays the next one in the list.
(D) Identifies songs the user wants to hear but does not own. Provides
a way to purchase the song and appends it to their playlist.
8. In the code, if “play” is a procedure, what does “song” represent in the
line: play(song)?
(A) It is the name of the procedure for documentation purposes.
(B) It is an input value where the user requests the song to be played.
(C) It is a value being passed to the procedure via an argument.
(D) It is an expression that must be evaluated to be used in the
procedure.
9. Which statement is NOT true?
(A) Lower level languages are easier to debug because the language is
closest to what the computer executes.
(B) Higher level languages are easier to debug because the language
is closer to natural language.
(C) Lower level languages provide less abstraction.
(D) Higher level languages are easier for people to code in because
they are more abstract.
10. If a simulation of the solar eclipse is set up to test the effectiveness of
glasses to safely view the sun, which scenario is most likely if the first
test shows the glasses are inadequate?
(A) The team can modify the degree of darkness and retest quickly to
determine the threshold of effectiveness.
(B) The team should stop the test and notify the company that makes
the glasses.
(C) The team should rerun the test multiple times to ensure the results
are valid.
(D) The team should rewrite the code for the simulation, and then
retest.
11. A simulation of conditions for a new sensor to be used with self-driving
cars is being designed. The pseudocode for the test is below.
Which condition is not a useful simulation test for the sensor?
(A) Multiple obstacles at the same time.
(B) Zero incidents.
(C) Set up objects at 3 feet, less than 3 feet, and greater than 3 feet to
determine the action taken.
(D) If the car causes an accident by swerving.
12. Which of the following will evaluate to “true”?
i. (true AND true) OR (true AND false)
ii. NOT(true OR false)
iii. NOT(false) AND NOT(true AND false)
(A) i and ii
(B) i and iii
(C) ii and iii
(D) i, ii, and iii
13. What outcome will the Boolean conditions in the diagram produce at
steps 1, 2, and 3?
(A) 1—True, 2—True, 3—True
(B) 1—False, 2—False, 3—True
(C) 1—False, 2—True, 3—True
(D) 1—True, 2—False, 3—False
14. A camera watching an eagle’s nest starts recording when a motion
detector starts. Which of the following is metadata?
(A) The latitude and longitude of the nest
(B) The date and time the motion is detected
(C) The number of eagles using the nest
(D) The number of frames per second the camera records
15. Susie’s mother wants a copy of a photo from a family vacation that
Susie took. The picture is too large to e-mail. How should Susie
compress the image if her mother wants to print a large copy of it
suitable for framing?
(A) She should use a lossless compression technique, which will be
needed to print a version with high enough quality to frame.
(B) She should use a lossy compression technique to obtain enough
compression to send the image.
(C) They should be combined for the best compression technique.
(D) Any compression technique will be sufficient in this case.
16. Which one of the following would be a good project for citizen
scientists and why?
(A) Counting pine trees in urban conditions to get accurate data about
the spread of the pine beetle
(B) Identifying new stars using personal telescopes to keep costs
lower for the tracking organization
(C) Reading different-genre books and evaluating them so book
publishers know which types of book manuscripts to accept and
market
(D) Counting fish in a lake to know if the fish are safe to consume
17. What describes the process of searching datasets for incomplete data
records to process?
(A) Classifying
(B) Cleaning
(C) Clustering
(D) Filtering
18. A teacher wants to determine student opinions of computer science
before and after taking a course. She gives students a survey on the first
and last days of class. The survey includes questions about students’
impressions of computer science, if the teacher communicated
effectively, if the teacher was positive about the course material, and if
students gave their best effort in the course. What questions can be
determined from the survey data?
i. If students who moved from a negative to positive impression of
computer science after taking the course also thought the teacher
communicated effectively
ii. Which students plan to major in computer science after taking the
course
iii. If the students who did not change their existing view of computer
science after taking the course gave their best effort in the course
(A) i
(B) i and iii
(C) ii and iii
(D) i, ii, and iii
19. Given the table of data about car accidents below, which outcome is
supported by the data?
(A) Drivers ages 16–25 have the fewest accidents.
(B) More accidents occur on the weekdays.
(C) Drivers age 26–50 have fewer accidents than the other two age
groups.
(D) Adult drivers have more accidents on weekdays during rush hour.
20. Why do businesses and scientists attempt to analyze large datasets?
(A) To gain insights smaller subsets of data may not provide
(B) To confirm findings from smaller datasets
(C) To identify potential problems in the metadata
(D) To obtain economies of scale with hardware needed to store the
data
21. How do the World Wide Web and the Internet work together?
(A) They perform the same functionality.
(B) The web uses HTTP to share web pages using the Internet.
(C) The Internet uses the web to connect devices to share data.
(D) The Internet is an application that runs using the web.
22. If a fire occurs at a major Internet hub, what is the result?
(A) Internet traffic will be routed to its destination a different way
because of the redundancy built into the Internet.
(B) The part of the globe that is served by that Internet hub will be
down because of the end-to-end architecture of the Internet.
(C) Different IP addresses will be assigned to devices that were
impacted by the unavailability of the Internet hub.
(D) People can use dedicated phone lines as a backup with no change
in service.

23. The time it took to complete a task sequentially was 25 seconds. The
time it took to complete the same task using a parallel computing
model was 10 seconds. What is the speedup?
(A) 2.5
(B) 0.4
(C) 15
(D) -15
24. If a company is trying to determine whether to upgrade its bandwidth
based on the following graph, what should they measure?
(A) Amount of data uploaded because it includes strategic company
backup data
(B) Amount of data downloaded because it has the largest impact on
the bandwidth
(C) Frequency of the peak times
(D) Number of devices used on the network
25. Why is the trust model of the Internet important?
(A) It ensures the private security key has not been compromised.
(B) It establishes a dedicated line between two destinations to ensure
security.
(C) It enables the secure transfer of data, such as a credit card
transaction, which allows online purchasing.
(D) It ensures the privacy of customers making online transactions.
26. You notice a file being uploaded every night to a site you are not
familiar with. Opening the file, it looks like a file of your work from
the day. This could be an example of a
(A) computer virus.
(B) keylogger file.
(C) network worm.
(D) phishing attack.
27. You are part of a team that created facial recognition software.
However, you just learned an innocent person was taken into custody
using only facial recognition software. What can the team do to remove
any bias in the future?
(A) Create better training materials for interpreting the results
(B) Use photos of a more diverse population to train the algorithm for
recognition
(C) Contact lawmakers to support regulation of the use of facial
recognition software
(D) Add new members to the team to increase the diversity to better
identify and avoid bias
28. You make a compressed version of an old classic song to send to a
friend. You notice that the sound quality is not as sharp as the original.
What is the likely cause?
(A) The file was compressed with a lossy algorithm.
(B) The file was compressed with a lossless algorithm.
(C) The file was corrupted during the copying process.
(D) The file was copied from a digital version rather than the original
analog version.
29. Which of the following is true about packets?
(A) The receiving device acknowledges the first and last packets to
indicate receipt of the data stream.
(B) Packets travel in order to their destination.
(C) Packets follow the shortest path to their destination.
(D) Packets are reassembled at their final destination.
30. How do TCP and IP interact?
(A) IP forwards the data to the ISP to identify which TCP to use.
(B) TCP hands off control to HTTP, which passes it to IP.
(C) TCP creates packets from the data to be sent and transfers control
to IP for routing. TCP then reassembles the packets at the
destination.
(D) IP uses UDP in conjunction with TCP to securely send data.
31. An e-mail goes out from your organization’s payroll department to all
employees stating that everyone needs to confirm or update their
banking information to ensure paychecks are deposited on time. It turns
out that this was not an e-mail from the payroll department. It is most
likely a
(A) computer virus.
(B) keylogger attack.
(C) phishing attack.
(D) malware insertion point.
32. You need to share a confidential file with another organization. You
know the file needs to be encrypted to prevent unauthorized access to
its contents. What is the best method of encryption to use?
(A) Certificate Authorities (CAs) to validate the security of the
organization where you are sending the data
(B) Multifactor authentication to ensure multiple steps of security
(C) Public key encryption so you do not have to share the encryption
key
(D) Symmetric key encryption so you each have the encryption and
decryption keys
33. What is a benefit of the government posting databases for public use?
(A) It is a way to identify the need for new policies and regulations.
(B) Consumers can learn more about how their individual data is
being collected, stored, and used.
(C) Companies can opt out to prevent competitors from learning about
their business.
(D) All businesses can access the data at no cost, aiding organizations
that would otherwise not have the resources to obtain the data on
their own.
34. Which algorithm will display the smallest number in a list of positive
numbers? Assume max is a variable holding the largest number in the
list.

(A)

(B)

(C)
(D)
35. Which of these is a Boolean expression?
(A) X ← 57
(B) Y ← temp * 120 / 100
(C) (temp > 32)
(D) 72 + 12 – (12 * 6) → z
36. What can be determined from the following program flow?

(A) A game is played by calling different procedures.


(B) An error will occur due to invalid procedure names.
(C) Parameters are missing from the procedures, resulting in a
runtime error.
(D) A compile time error occurs due to Score() and HighScore().
37. Which statement’s format is incorrect?

(A)
(B) x ← x + y
(C) list[i] ← list[j]

(D)
38. Which algorithm should be used to find a phone number on a contact
list?
I.
Sort the contact list by name
Search for the phone number using a binary search
Display the correct phone number
II.
Sort the contact list by area code
Search for the phone number using a linear search
Display the correct phone number
(A) I.
(B) II.
(C) I and II are equally effective.
(D) A combination of both I and II should be used.
39. Why does a computer playing chess use a heuristic algorithm?
(A) It ensures that the computer only wins a certain number of times,
making it a more enjoyable experience for people.
(B) It ensures that humans only win a certain percentage based on
statistics.
(C) It takes too long to analyze all possible moves, so the computer
takes the next best move.
(D) It checks each possible combination of moves for the best move.
40. You are determining the attributes for an AI (Artificial Intelligence)
algorithm for a bank to use for approving customers for loans. You
select age, income, employment status, and active-loan status as
attributes to consider. The bank finds that very few new loans are being
offered to college-educated individuals due to existing college loans.
This is an example of bias in
(A) analyzing the data.
(B) collecting the data.
(C) preparing the data.
(D) reporting the data.
41. If a list named snacks contains the values:
A variable place is assigned the value:
place ← LENGTH(snacks)

What will the value snacks[place] contain?


(A) 5, the number of items in the list.
(B) 6, the number of letters in the word “grapes.”
(C) grapes, which is the value in the 5th position of the list.
(D) Error, a list cannot be accessed in this way.
42. Will both of the following two blocks produce correct results? Assume
all variables have been properly initialized.
(A) Only Block 1 is correct.
(B) Only Block 2 is correct.
(C) Both blocks are correct.
(D) Neither block is correct.
43. Determining that an algorithm has a polynomial efficiency means it
runs in
(A) an acceptable amount of time even for large datasets.
(B) less time for worst-case scenarios than average scenarios.
(C) an exponential amount of time possibly even for small datasets,
making it unable to run for large datasets.
(D) a fractional amount of time for fractional values.
44. Which set of code will calculate the letter grade correctly for a 10-point
scale? Assume average is a variable holding the student average.
(A)

(B)
(C)
(D)
45. The code below is a robot algorithm. Which diagram matches the code?
(A)

(B)
(C)

(D)
46. What benefit does an API provide?
(A) It allows programmers to share their code via the API for others
to test.
(B) It connects software components providing prewritten and tested
code available for use.
(C) It provides algorithms for difficult code to be reviewed.
(D) It provides documentation programmers can use for their
programs rather than creating their own.
47. What is the value of x after the code below runs?

(A) -10
(B) 10
(C) 4
(D) -4
48. What is the value of y after the following statements?

(A) 0
(B) 2
(C) 3
(D) 4
49. What is displayed after the following code runs?
(A) 10
(B) 15
(C) 20
(D) 25
50. Which of the following two algorithms produces the sum of the
elements in the list? Assume the list is initialized and is not empty.
(A) Block 1
(B) Block 2
(C) Blocks 1 and 2
(D) Neither Block 1 nor 2
51. What will the following code produce?

A. “Hello World!” will be printed multiple times.


B. The code inside the REPEAT UNTIL loop never executes.
C. The REPEAT UNTIL loop never ends, creating an infinite loop.
D. The program will have a runtime error.
52. What will the code display?

(A) popcorn, candy, grapes, apples, banana


(B) popcorn, candy, grapes, apples, banana, banana
(C) popcorn, candy, grapes, apples, banana, banana, banana
(D) popcorn, candy, grapes, apples, banana, banana, banana, banana
53. What is the value of snacks after the following code is run?

(A) 5, 6, 7, 8, candy, grapes, apples, banana


(B) popcorn, candy, grapes, apples, popcorn, candy, grapes, apples
(C) popcorn, popcorn, popcorn, popcorn, candy, grapes, apples,
banana
(D) popcorn, popcorn, popcorn, popcorn, popcorn, popcorn, popcorn,
popcorn
54. If a procedure accepts two strings as parameters and returns a
combined string, what is the procedure doing?

(A) Appending
(B) Attaching
(C) Bonding
(D) Concatenating
55. What is an iterative software development process designed to do?
(A) Produce better software with a proven process
(B) Shorten the time of developing software by beginning to code
while the requirements are being determined
(C) Eliminate the testing step by using only APIs
(D) Develop it right the first time through the iterative process
56. Suppose your program needs to process all values less than a specified
value, but your actual test results do not match the expected test results.
What is NOT a debugging technique you can use to identify the
problem?
(A) Hand-tracing the code
(B) Adding DISPLAY statements to see values in variables at
different points in your program
(C) Using a visualizer to view the code as it is executing
(D) Rerunning the code to verify the results
57. Which set of code will move the robot from start to stop and end facing
the correct direction? The robot may not move into gray blocks.
(A)

(B)

(C)

(D)
Questions 58–62 are related to this passage and chart.

There is an app to help farmers know when fruit is ready to harvest. You are
planning to use this and modify it to create a new app to help grocery
shoppers know how ripe fruit in the grocery store is. You also plan to let
consumers enter any food allergies into the app.
58. What input data is most likely to be needed for the app to work?
(A) Chlorophyll levels of fruit
(B) Image of fruit ripeness levels based on color
(C) Date of harvesting and average number of days to get to store
shelf
(D) Scheduled delivery dates of fruit at local grocery stores
59. Which of the following is the most likely potential impact on the
economy due to widespread use of the app?
(A) People are less likely to eat overripe fruit, losing the health
benefits and incurring higher medical costs.
(B) More food will go to waste if people do not purchase it based on
the app results.
(C) As information spreads about which grocery chain has the freshest
fruit, other chains will suffer as people move their shopping to the
stores with fresher fruit. People could lose their jobs as a result.
(D) Medical costs will go down as people are eating more fruit.
60. Which of the following is the most likely potential benefit of the app?
(A) Less likelihood of people squeezing fruit in the store to test its
ripeness and potentially bruising it
(B) Fewer germs left on fruit in the stores from people handling it
(C) Fruit lasting longer in homes and more likely to be eaten,
increasing people’s general healthiness
(D) Less money wasted with fruit that quickly goes bad
61. What is the most likely storage concern of the app?
(A) If fruit comparison data is stored in the cloud, you must have a
strong enough signal to connect to the Internet for the app to
work.
(B) There are so many different types of fruit, the app cannot store
them all.
(C) Maintaining a record of the stores with the freshest fruits will take
a lot of storage space, slowing down the app.
(D) Having to store data in the cloud and retrieving fruit ripeness
values stored in the cloud will make the app too slow for most
consumers.
62. What process does the app need to perform?
(A) Measure the size of the piece of fruit
(B) Record grocery store name and date
(C) Identify the fruit for correct comparisons
(D) Compare chlorophyll levels in the piece of fruit to a value
representing chlorophyll levels in an average ripe piece of that
fruit
63. Cloud-based data storage is best when what conditions are true of those
working with the data? Select two answers.
(A) They are in a secured location.
(B) They are in separate locations.
(C) They are dealing with sensitive data.
(D) They have limited storage at their location.
64. Computers have enabled new innovations in a variety of industries. In
the entertainment business, it has become much easier to purchase and
share new music. What concern has been raised as a result? Select two
answers.
(A) People are modifying other people’s content and claiming the
Creative Commons licensing allows it.
(B) People are being discovered for their music because others are
posting it to music-sharing sites.
(C) People are sharing content without the author/owner’s permission.
(D) Artists are adding their music to streaming services with Creative
Commons licensing, bypassing record companies.
65. An organization collects massive amounts of data, more than they can
currently process. What options should they consider using to be able
to process their data to gain insights? Select two answers.
(A) Centralized computing system
(B) Distributed computing system
(C) Parallel computing system
(D) Sequential computing system
66. Which two protocols are responsible for breaking the data into packets
and putting it back together at the destination? Select two answers.
(A) TCP
(B) HTTP
(C) FTP
(D) UDP
67. Why should public key encryption be used? Select two answers.
(A) It is shorter than other ciphers.
(B) It cannot be broken with brute force techniques.
(C) It uses an asymmetric key, making it harder to decrypt.
(D) It uses a symmetric key, making it harder to decrypt.
68. Which of the following can be stored in a bit? Select two answers.
(A) The result of a number MOD 2
(B) A Boolean variable
(C) A variable that could hold a range of positive values
(D) A computer that can be on, off, or in “sleep” mode
69. A company is trying to separate information it has into data and
metadata. Which of the following would be considered metadata about
documents? Select two answers.
(A) Author of document
(B) File size
(C) Internal page number
(D) Table of Contents
70. What is important to remember when converting a music file from
analog data to digital data? Select two answers.
(A) Analog data is a set of continuous values.
(B) Copies of analog data files are more precise.
(C) A higher sampling rate will result in a more accurate digital
version.
(D) The samples are compressed to create a smaller digital file.

STOP. End of Exam.

You might also like