Search Header Logo

AP CSP Practice — Part 1 of 4

Authored by Viraaj Vatte

History

10th Grade

AP CSP Practice — Part 1 of 4
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

32 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A programmer notices that the same block of code calculating tax is repeated in 4 different parts of a program. Which of the following best describes how the programmer should improve the code?

Add comments throughout the program to document the duplicated code.
Replace the four duplicated blocks with a single procedure called from each location.
Convert all variables in the block to global variables.
Combine the four blocks into a single long block of sequential statements.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following BEST describes the difference between a syntax error and a logic error?

Syntax errors prevent a program from running; logic errors allow it to run but produce incorrect results.
Syntax errors occur when the user enters bad input; logic errors are caused by the programmer.
Syntax errors only occur in compiled languages; logic errors only occur in interpreted languages.
Syntax errors are caused by hardware failures; logic errors are caused by software bugs.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A team of developers is creating a fitness tracking app. They release an early version to a small group of users to gather feedback before adding more features. This practice is best described as which of the following?

Documentation
Iterative development
Procedural abstraction
Crowdsourcing

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the MOST important reason for a development team to include people from diverse backgrounds?

Diverse teams can complete tasks faster because more people are working.
Diverse teams are more likely to identify needs and biases that affect different user groups.
Diverse teams reduce the need for testing because more people verify the code.
Diverse teams eliminate the need for documentation.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?