AP CSP Identifying Errors

AP CSP Identifying Errors

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

AP CSP Pseudo Code

AP CSP Pseudo Code

10th - 12th Grade

8 Qs

APCSP Pseudocode

APCSP Pseudocode

10th - 12th Grade

8 Qs

U5 Arrays/Lists Homework

U5 Arrays/Lists Homework

10th - 12th Grade

10 Qs

AP CS practice 2

AP CS practice 2

11th Grade - University

12 Qs

UKD4 Multimedia 11

UKD4 Multimedia 11

11th Grade

15 Qs

AP Comp (POP Quiz)

AP Comp (POP Quiz)

9th - 12th Grade

7 Qs

10 question quiz on identifying and correcting errors

10 question quiz on identifying and correcting errors

9th - 12th Grade

10 Qs

Python Lists v2

Python Lists v2

9th - 12th Grade

15 Qs

AP CSP Identifying Errors

AP CSP Identifying Errors

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Stephanie Kimbrough

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

A video-streaming Web site keeps count of the number of times each video has been played since it was first added to the site. The count is updated each time a video is played and is displayed next to each video to show its popularity.

At one time, the count for the most popular video was about two million. Sometime later, the same video displayed a seven-digit negative number as its count, while the counts for the other videos displayed correctly. Which of the following is the most likely explanation for the error?

The count for the video became larger than the maximum value allowed by the data type used to store the count.

The mathematical operations used to calculate the count caused a rounding error to occur.

The software used to update the count failed when too many videos were played simultaneously by too many users.

The software used to update the count contained a sampling error when using digital data to approximate the analog count.

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

Assume that the list originalList contains integer values and that the list newList is initially empty. The following code segment is intended to copy all even numbers from originalList to newList so that the numbers in newList appear in the same relative order as in originalList. The code segment may or may not work as intended. Which of the following changes, if any, can be made so that the code segment works as intended?

  1. Changing line 1 to FOR EACH number IN newList

  1. Changing line 3 to IF (number MOD 2 = 1)

  1. Changing line 5 to APPEND (newList, number)

  1. No change is needed; the code segment is correct as is.

3.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Media Image
  1. For the question or incomplete statement below, two of the suggested answers are correct. For this question, you must select both correct choices to earn credit. No partial credit will be earned if only one correct choice is selected. Select the two that are best in each case.

    A program is created to perform arithmetic operations on positive and negative integers. The program contains the following incorrect procedure, which is intended to return the product of the integers X and Y. A programmer suspects that an error in the program is caused by this procedure. Under which of the following conditions will the procedure NOT return the correct product?

  1. When the values of and are both positive.

  1. When the values of is positive and the value of is negative.

  1. When the values of is negative and the value of is positive.

  1. When the values of and are both negative.

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

  1. Central High School keeps a database of information about each student, including the numeric variables numberOfAbsences and gradePointAverage. The expression below is used to determine whether a student is eligible to receive an academic award.

  2. (numberOfAbsences ≤ 5) AND (gradePointAverage > 3.5)


  3. Which of the following pairs of values indicates that a student is eligible to receive an academic award?

numberOfAbsences = 3, gradePointAverage = 3.5

numberOfAbsences = 5, gradePointAverage = 3.8

numberOfAbsences = 6, gradePointAverage = 3.4

numberOfAbsences = 6, gradePointAverage = 3.6

5.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Media Image

For the question or incomplete statement below, two of the suggested answers are correct. For this question, you must select both correct choices to earn credit. No partial credit will be earned if only one correct choice is selected. Select the two that are best in each case.

The procedure is intended to return the least value in the list. The procedure does not work as intended.

Media Image
Media Image
Media Image
Media Image

6.

MULTIPLE SELECT QUESTION

3 mins • 1 pt

Media Image

For the question or incomplete statement below, two of the suggested answers are correct. For this question, you must select both correct choices to earn credit. No partial credit will be earned if only one correct choice is selected. Select the two that are best in each case.

9

8

7

6

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Media Image

The following procedure is intended to return true if the list of numbers myList contains only positive

numbers and is intended to return false otherwise. The procedure does not work as intended. For which of the following contents of myList does the procedure NOT return the intended result?

  1. [-3, -2, -1]

  1. [-2, -1, 0]

  1. [-1, 0, 1]

  1. [1, 2, 3]

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?