AP Computer Science Principles-EXAM1-5 Steps to a 5-MCQ
AP Computer Science Principles-EXAM1-5 Steps to a 5-MCQ
Multiple-Choice Questions
ANSWER SHEET
AP Computer Science Principles Diagnostic Test
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 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.
Questions 46–50.
A GPS company is developing a new software app called “Find my car!” to
work with self-driving vehicles. If you cannot remember where you parked
your vehicle, or it’s raining when you are leaving a location, you can press a
button on an app to summon your vehicle. The self-driving car will exit its
parking spot and drive to your GPS location for you to enter the vehicle.
Here is a flowchart of the process.
46. Is this a computing innovation? Why or why not?
(A) A computer program is not needed, so the app is not a computing
innovation.
(B) The programming is completed by the GPS satellite, not this
innovation, so the app is not a computing innovation.
(C) The programming is controlled by the self-driving car’s
manufacturer, so the app is not a computing innovation.
(D) The app sends GPS coordinates to the vehicle, along with the
signal to drive to the location, so the app is a computing
innovation.
47. What output does the app produce?
(A) Instructions to start the vehicle and drive to the coordinates
provided
(B) The button event to be pressed
(C) A signal to the GPS satellites to send current location coordinates
(D) Directions to get from the parking spot to the current location
48. What is the most likely privacy concern of the app?
(A) Two people using the app at the same location could cause the
signal to be sent and recognized by both vehicles.
(B) Location data would be available and potentially used by the
company to identify future needed updates to the app.
(C) Unauthorized individuals could use the app to summon someone
else’s vehicle.
(D) People could enter the waiting vehicle before the driver gets to it.
49. Which of the following is the most likely potential harm of the app?
(A) Traffic congestion for drivers and pedestrians at restaurant and
shopping entrances that were not designed for multiple waiting
vehicles
(B) Increased air pollution if people leave their self-driving cars idling
until they get to the vehicle
(C) Car accidents when people driving vehicles are maneuvering
around the self-driving waiting vehicles
(D) Illegal parking as people leave their cars running to run into a
store for a “quick” errand
50. What data is most likely to be needed for the app to work?
(A) Fingerprint reader for valid entry to the vehicle
(B) Accurate longitude and latitude coordinates
(C) Cameras for the vehicle to safely navigate to the signaled location
(D) Sensor to recognize the signal summoning the vehicle
51. Tracing what your code is doing is an example of which of the
following terms?
(A) Discovery
(B) Debugging
(C) Traversing
(D) Scaffolding
52. What is an example of “metadata”?
(A) A line of code
(B) A header in a document
(C) Author of the document
(D) Test data
53. Why should we use an iterative development approach?
(A) Because each iteration improves or adds code to build a
successful program
(B) To meet the legal requirements for code to handle sensitive data
(C) To be able to begin coding while remaining requirements are
being defined
(D) To minimize the amount of time needed for testing
54. You need to write a program named calculate to compute the average
temperatures for an area. What would be the best variable name for this
and why?
(A) t—Variable names should be short so there is less opportunity for
a typo.
(B) avgTemperature—Variable names should be descriptive to help
others understand their purpose.
(C) calculateAvgTemp—Variable names should start with program
name and then the variable name for ease of tracking.
(D) 1Temp—Variable names should begin with a number starting with
1, followed by 2, and so on to know how many there are.
55. How can you defend a phishing attack?
(A) Block incoming web traffic until the attack is over.
(B) Open the website in question directly rather than clicking on the
link provided.
(C) Install antivirus software and keep it updated.
(D) Never open unexpected e-mail attachments.
56. On the AP exam, compound expressions can be created using which of
the following operators?
(A) IS / IS NOT
(B) NOT / NOR
(C) IF / ONLY IF
(D) AND / OR
57. What does it mean when we say the Internet is redundant?
(A) Parts of it are unnecessary.
(B) If a path is down, packets can be routed a different way.
(C) It has a delay between the request and the response to the request.
(D) If there is an error, a backup system is brought online to be used.
58. What are packets in reference to the Internet?
(A) The delay in time from when a request is sent and received
(B) The individual sections of the IP address
(C) Information to be sent over the Internet broken into same-size
groupings
(D) The intermediate locations that send information to their
destination
59. What is the best use of spreadsheets and databases?
(A) Scale up to process more data
(B) Organize and filter data
(C) Create metadata
(D) Compress data
60. Which type of problem attempts to find the best solution from several
possibilities?
(A) Algorithmic problem
(B) Decision problem
(C) Efficiency problem
(D) Optimization problem
61. What describes the process of keeping common or similar features and
functionality while removing details that are different?
(A) Algorithm
(B) Decomposition
(C) Simulation
(D) Abstraction
62. A half-time program wants to randomly select a seat number for an
attendee to come shoot baskets for the chance to win prize money.
What code could randomly select a number from a list of seats checked
in? Assume all variables are initialized correctly.
(A) selected ← (RANDOM(start, stop))
(B)
(C) REPEAT UNTIL (RANDOM(start, stop) = 0)
(D)
63. What is a method to confirm a person’s credentials before providing
access? Select two answers.
(A) Biometric identification
(B) Public key encryption
(C) A symmetric password
(D) A security token sent to a device such as a cell phone
64. Which of the following selection statements correctly tests if a number
is less than 914? Select two answers.