AP Computer Science Principles

Quiz
•
Other
•
12th Grade
•
Hard

Jacob Walz
Used 3+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment. result 𝑟 2 REPEAT 3 TIMES result 𝑟 result * 5 DISPLAY result Which of the following best describes the behavior of the code segment?
The code segment displays the value of 2(5 × 3) by initializing result to 2 and then multiplying result by 3 a total of five times.
The code segment displays the value of 2(5 × 3) by initializing result to 2 and then multiplying result by 5 a total of three times.
The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 3 a total of five times.
The code segment displays the value of 2(5^3) by initializing result to 2 and then multiplying result by 5 a total of three times.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the behavior of the procedure?
It displays nothing if x is negative and displays true otherwise.
It displays nothing if x is negative and displays false otherwise.
It displays true if x is negative and displays nothing otherwise.
It displays true if x is negative and displays false otherwise.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A company that develops educational software wants to assemble a collaborative team of developers from a variety of professional and cultural backgrounds. Which of the following is NOT considered a benefit of assembling such a team?
Collaboration that includes diverse backgrounds and perspectives can eliminate the need for software testing.
Collaboration that includes diverse backgrounds and perspectives can help the team anticipate the needs of a variety of software users.
Collaboration that includes diverse backgrounds and perspectives can help the team avoid bias.
Collaboration that includes diverse backgrounds and perspectives can reflect the strengths of the individual team members.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an advantage of a lossless compression algorithm over a lossy compression algorithm?
A lossless compression algorithm can guarantee that compressed information is kept secure, while a lossy compression algorithm cannot.
A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.
A lossless compression algorithm typically allows for faster transmission speeds than does a lossy compression algorithm.
A lossless compression algorithm typically provides a greater reduction in the number of bits stored or transmitted than does a lossy compression algorithm.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A certain programming language uses 4-bit binary sequences to represent nonnegative integers. For example, the binary sequence 0101 represents the corresponding decimal value 5. Using this programming language, a programmer attempts to add the decimal values 14 and 15 and assign the sum to the variable total. Which of the following best describes the result of this operation?
The correct sum of 29 will be assigned to the variable total.
An overflow error will occur because 4 bits is not large enough to represent either of the values 14 or 15.
An overflow error will occur because 4 bits is not large enough to represent 29, the sum of 14 and 15.
A round-off error will occur because the decimal values 14 and 15 are represented as approximations due to the fixed number of bits used to represent numbers.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A video game character can face toward one of four directions: north, south, east, and west. Each direction is stored in memory as a sequence of four bits. A new version of the game is created in which the character can face toward one of eight directions, adding northwest, northeast, southwest, and southeast to the original four possibilities. Which of the following statements is true about how the eight directions must be stored in memory?
Four bits are not enough to store the eight directions. Five bits are needed for the new version of the game.
Four bits are not enough to store the eight directions. Eight bits are needed for the new version of the game.
Four bits are not enough to store the eight directions. Sixteen bits are needed for the new version of the game.
Four bits are enough to store the eight directions.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 counties across the United States. The program is intended to combine county data sets and then process the data. Which of the following is most likely to be a challenge in creating the program?
A computer program cannot combine data from different files.
Different counties may organize data in different ways.
The number of counties is too large for the program to process.
The total number of rows of data is too large for the program to process.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Computer Hardware

Quiz
•
11th - 12th Grade
15 questions
Soups

Quiz
•
7th - 12th Grade
15 questions
Magnetic Storage

Quiz
•
10th - 12th Grade
15 questions
Introduction to Robotics and Programming

Quiz
•
6th Grade - University
15 questions
ACT Prep English: Parallelism

Quiz
•
9th - 12th Grade
18 questions
Spreadsheet Terminology Review

Quiz
•
9th - 12th Grade
15 questions
Introduction to Deep Learning and Neural Network

Quiz
•
7th - 12th Grade
15 questions
1.3 Quiz

Quiz
•
8th Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade