Search Header Logo

AP CSP Unit 5, Quiz 4 Review

Authored by Kammas Kersch

Computers

10th - 12th Grade

Used 119+ times

AP CSP Unit 5, Quiz 4 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

After running the following code segment, what is contained in the array data?

[3, 1, 8, 4, 4]

[2, 3, 4, 5, 6]

[2, 3, 4, 5, 4]

[3, 1, 8, 4 null]

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

How many times will this loop iterate? 

4
7
5
6

3.

MULTIPLE CHOICE QUESTION

15 mins • 1 pt

A syntax error means your code has a 'grammar' mistake or you used symbols/operations incorrectly

True
False

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not an action a programmer should take when debugging a segment of code?

Display the value of variables at various points during the program

Ask a friend or collaborator to look over the code segment to see if they are able to find any errors

Delete all the code and re-type it

Check the names of each variable for spelling and capitalization errors

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

You are writing a reply function for a text messaging app. You want to swap the sender and receiver so that the value currently in From ends up as the value in To and To ends up in From. Which code segments will correctly swap the values?

to = from

from = to

from = var temp

to = temp

from = to

var temp = from

from = to

to = from

var temp = from

from = to

to = temp

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Any sequence of characters between quotation marks

String
Rope
Values
Numbers

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Use the following code segment to answer this question.

What would be the output of the equation procedure when a is 9, b is 10, and c is 4?

18

72

-72

360

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?