Search Header Logo

APCSP Big Idea 3 Review

Authored by Amy Austin

Computers

10th - 12th Grade

Used 19+ times

APCSP Big Idea 3 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?

When the problem can be solved in a reasonable time and an approximate solution is acceptable

When the problem can be solved in a reasonable time and an exact solution is needed

When the problem cannot be solved in a reasonable time and an approximate solution is acceptable

When the problem cannot be solved in a reasonable time and an exact solution is needed

2.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

A sorted list of numbers contains 500 elements. Which of the following is closest to the maximum number

of list elements that will be examined when performing a binary search for a value in the list?

10

50

250

500

3.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Media Image

Consider the code segment in the picture.

If the variables onTime and absent both have the value false, what is displayed as a result of running the

code segment?

Is anyone there?

Better late than never.

Hello. Is anyone there?

Hello. Better late than never.

4.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Media Image

Consider the following program code.

Which of the following best describes the result of running the program code?

The number 0 is displayed.

The number 6 is displayed.

The number 10 is displayed

Nothing is displayed; the program results in an infinite loop.

5.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

Media Image

An office building has two floors. A computer program is used to control an elevator that travels between

the two floors. Physical sensors are used to set the following Boolean variables.(In the picture)

The elevator moves when the door is closed and the elevator is called to the floor that it is not currently on.

Which of the following Boolean expressions can be used in a selection statement to cause the elevator to

move?

(onFloor1 AND callTo2) AND (onFloor2 AND callTo1)

(onFloor1 AND callTo2) OR (onFloor2 AND callTo1)

(onFloor1 OR callTo2) AND (onFloor2 OR callTo1)

(onFloor1 OR callTo2) OR (onFloor2 OR callTo1)

6.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

A list of numbers has n elements, indexed from 1 to n. The following algorithm is intended to display

the number of elements in the list that have a value greater than 100. The algorithm uses the variables

count and position. Steps 3 and 4 are missing.

Step 1: Set count to 0 and position to 1.

Step 2: If the value of the element at index position is greater than 100, increase the value of

count by 1.

Step 3: (missing step)

Step 4: (missing step)

Step 5: Display the value of count.

Which of the following could be used to replace steps 3 and 4 so that the algorithm works as intended?

Step 3:

Increase the value of position by 1.

Step 4:

Repeat steps 2 and 3 until the value of count is greater than 100

Step 3:

Increase the value of position by 1.

Step 4:

Repeat steps 2 and 3 until the value of position is greater than n

Step 3:

Repeat step 2 until the value of count is greater than 100.

Step 4:

Increase the value of position by 1

Step 3:

Repeat step 2 until the value of position is greater than n.

Step 4: Increase the value of count by 1

7.

MULTIPLE CHOICE QUESTION

10 mins • 1 pt

The following procedure is intended to return the number of times the value val appears in the list

myList. The procedure does not work as intended.

Which of the following changes can be made so that the procedure will work as intended?

Changing line 6 to IF(item = count

Changing line 6 to IF(myList[item] = val)

Moving the statement in line 5 so that it appears between lines 2 and 3

Moving the statement in line 11 so that it appears between lines 9 and 10

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?