AP Computer Science Principles

AP Computer Science Principles

12th Grade

20 Qs

quiz-placeholder

Similar activities

Module 3: Unit 1 ITF+ Systems Components

Module 3: Unit 1 ITF+ Systems Components

9th - 12th Grade

20 Qs

Exploring the Basics of C Programming

Exploring the Basics of C Programming

11th Grade - University

20 Qs

Pre-assessment

Pre-assessment

11th - 12th Grade

20 Qs

ACT Prep English: Parallelism

ACT Prep English: Parallelism

9th - 12th Grade

15 Qs

Programming Fundamentals

Programming Fundamentals

KG - University

20 Qs

Culinary Terms

Culinary Terms

9th - 12th Grade

16 Qs

ITGS Strand Three: 3.01 Hardware

ITGS Strand Three: 3.01 Hardware

9th - 12th Grade

15 Qs

Basics of App Coding

Basics of App Coding

8th - 12th Grade

22 Qs

AP Computer Science Principles

AP Computer Science Principles

Assessment

Quiz

Other

12th Grade

Hard

Created by

Jacob Walz

Used 3+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

Media Image

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?