Image courtesy of Pixabay
β
STOP β Before you look at the answers, make sure you gave this practice quiz a try so you can assess your understanding of the concepts covered in
Big Idea 3. Click here for the practice questions:
AP CS: Principles Big Idea 3 Multiple Choice Questions.
Facts about the test: The AP CS: Principles exam has 70 multiple choice questions and you will be given 2 hours (120 minutes)
to complete the section. That means it should take you
around 10 minutes to complete 6 questions.
The following questions were not written by College Board and, although they cover information outlined in the AP Computer Science Principles Course and Exam Description, the formatting on the exam may be different.
1. How are list elements accessed individually?A. The list name with an integer index in brackets.
B. The list name is with the value the code needs to access.
C. The "access" command with the list name and length.
D. A FOR REACH loop with the list to find an individual value.
Explanation: Each element in the list has an index position.. for example songList[4]
Read this guide to review lists!
2. What do logical conditions evaluate to?
A. a constant
B. a string
C. a real number
D. a boolean
Explanation: logical conditions results are boolean.
Read this guide about boolean expressions!
3. Consider a 4-bit binary sequences to represent nonnegative integers. For example, 0101 represents the decimal value 5. Using this, add the decimal values 14 and 15 and assign the result to the variable total. Which of the following best describes the result?
A. 29 will be assigned to the variable total.
B. An overflow error because 4 bits is not big enough to represent 29.
C. An overflow error because 4 bits is not large enough to represent either of the values 14 or 15.
D. A round-off error because 14 and 15 are represented as approximations due to the fixed number of bits used.
Explanation: The largest 4-bit binary number is 1111, or decimal 15. Since 29 > 15, an overflow error will occur.
Watch this guide on Unit 3!
4. You stop at a convenience store to purchase your favorite energy drink. The cash register displays the change you are owed as $0.049999999999 instead of 5 cents. What happened?
A. The DISPLAY procedure in the cash register software has an error.
B. The computer is displaying in a different currency.
C. A rounding error happened because decimal values (like money) are stored imprecisely
D. The change is being displayed in hexadecimal rather than decimal
Explanation: floating point (decimals) are stored imprecisely which can cause rounding errors... should not be used for money transactions.
Read this guide about variables and assignments!
5. You pull into a public parking garage that assigns parking spots by automated matching. When looking at the ticket, the parking space number is displayed in binary, but the actual parking spots are labeled in decimal. Which spot (in decimal) is 10011011?
A. 155
B. 154
C. 157
D. 9F
Explanation: 128+16+8+2+1=155
6. Which statement is NOT true?
A. Low-level languages are easier to debug since they are have fewer options.
B. Higher-level languages are easier to debug because the language is closer to natural language.
C. Low-level languages provide less abstraction
D. High level languages are easier to code since they are more like natural language.
Explanation: Low level languages are closer to machine language, which is tougher for people to debug
Watch this review of Big Idea 3!
7. Which of the following are true about the data that can be represented using binary sequences?
A. Binary sequences can be used to represent strings of characters.
B. Binary sequences can be used to represent colors.
C. Binary sequences can be used to represent audio recordings.
D. All of the above
Explanation: All digital data is represented at the lowest level as sequences of bits.
8. Consider the following code segment (see below). Which variables have a value of 50 after the segment runs?
A. x
B. y
C. x and z
D. x, y, and z
Explanation: The first three statements assign values to the variables. The fourth statement assigns 50 to x. The fifth statement assigns 75 to y. The sixth statement assigns 50 to z.
Read this guide about variables and assignments!
9. For a binary search to give accurate results, what must be true of the data?
A. The data must be unsorted before the search
B. The data must be sorted before the search
C. The data must not have duplicate or repeated values
D. The data must be fewer than a billion records
Explanation: Binary search depends on data being sorted
Read this guide about binary search!
10. What does iteration with computer science loops mean?
A. Repeating a block of code until a condition is met
B. Executing code once
C. Duplicating a section of code multiple times in a program
D. Identifying error conditions in a program
Explanation: Iteration means "repeat", so a loop will repeat until a condition is met causing it to end
Read this guide about iteration!
11. Three numbers need to be put into order from smallest to greatest. Which of the following algorithms can be used to accomplish this?
A. If the first number is greater than the middle one, swap them. Then, if the middle number is greater than the last one, swap them. Then, if the first number is greater than the last, swap them.
B. If the first number is greater than the middle one, swap them. Then, if the middle number is greater than the last, swap them.
C. If the first number is greater than the last, swap them. Then, if the first number is greater than the middle number, swap them.
D. If the first number is greater than the middle, swap them. Then, if the middle number is greater than the last, swap them. Then, if the first number is greater than the middle, swap them.
Explanation: After comparing the first and middle numbers and potentially swapping them, and then comparing the middle and last numbers and potentially swapping them, the largest number will be in the third position. Next, after comparing the first and middle numbers and potentially swapping them, the three will be ordered from least to greatest.
Read this guide about algorithms!
12. What order has the programming languages in most abstract to least abstract order?
A. block-based language, text-based language, machine language assembly language
B. text-based language, assembly language, block-based language, machine language
C. block-based language, text-based language, assembly language, machine language
D. machine language assembly language, block-based language, text-based language,
Explanation: block based is closest to natural language and so most abstract. Text based is easy to read & use. Machine & computer language are hardest for people to work with.
Watch this review of Big Idea 3!
13. Which of the following is the best meaning for heuristic in computer science?
A. A heuristic is a sequential set of specific steps used to solve a precise problem
B. A heuristic is a shortcut that sacrifices accuracy and completeness.
C. A heuristic is the act of using a computer to find specific solutions to a problem that cannot be solved by hand.
D. A heuristic is to the method used to decide whether there exists an assignment to a set of variables which satisfies specified constraints between pairs of variables
Explanation: definition of heuristic
Read this guide on Algorithmic Efficiency!
14. What is the value of y after the following statements?
A. 0
B. 2
C. 3
D. 4
Explanation: MOD gives the remainder when 2 numbers are divided.
Watch this review of Big Idea 3!
15. Which of the following will demonstrate that the problem is undecidable?
A. Show that for one instance of the problem, an algorithm that runs in unreasonable time can be written that is capable of providing a correct yes-or-no answer.
B. Show that for one instance of the problem, an algorithm that runs in unreasonable time can be written that is capable of providing a correct yes-or-no answer.
C. Show that for one instance of the problem, an algorithm can be written that is always capable of providing a correct yes-or-no answer.
D. Show that for one instance of the problem, no algorithm can be written that is capable of providing a correct yes-or-no answer.
Explanation: An undecidable problem is one for which no algorithm can be constructed that is always capable of providing a correct yes-or-no answer. There is no algorithmic solution that can solve all instances of the problem.
Read this guide about Undecidable Problems!
What can we help you do now?
π€Connect with other students studying AP CS: P with
Hours