AP Computer Science Principles

Quiz
•
Other
•
12th Grade
•
Medium

Jacob Walz
Used 11+ 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
20 questions
Livestock Industry Pretest

Quiz
•
12th Grade
15 questions
Classifying Computers by Size

Quiz
•
7th Grade - University
24 questions
Hospitality & Tourism Checkpoint

Quiz
•
9th - 12th Grade
20 questions
GED social studies terms

Quiz
•
9th Grade - University
20 questions
Indian Economy 1950-1990

Quiz
•
12th Grade
15 questions
SOAL MID INFORMATIKA KELAS 7

Quiz
•
9th - 12th Grade
20 questions
PH TIK Fase E

Quiz
•
9th - 12th Grade
15 questions
Quiz on Word Processing

Quiz
•
11th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Video Games

Quiz
•
6th - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade
16 questions
AP Biology: Unit 1 Review (CED)

Quiz
•
9th - 12th Grade
20 questions
Parallel lines and transversals

Quiz
•
9th - 12th Grade
9 questions
Geometry and Trigonometry Concepts

Interactive video
•
9th - 12th Grade
10 questions
Angle Relationships with Parallel Lines and a Transversal

Quiz
•
9th - 12th Grade