AP CSP Identifying Errors

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
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
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?
Changing line 1 to FOR EACH number IN newList
Changing line 3 to IF (number MOD 2 = 1)
Changing line 5 to APPEND (newList, number)
No change is needed; the code segment is correct as is.
3.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
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?
When the values of and are both positive.
When the values of is positive and the value of is negative.
When the values of is negative and the value of is positive.
When the values of and are both negative.
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
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.
(numberOfAbsences ≤ 5) AND (gradePointAverage > 3.5)
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
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.
6.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
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
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?
[-3, -2, -1]
[-2, -1, 0]
[-1, 0, 1]
[1, 2, 3]
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
AP CSP Boolean Logic 2

Quiz
•
9th - 12th Grade
14 questions
Lists, Subroutines and Sequence in Pseudocode - Python

Quiz
•
1st - 11th Grade
15 questions
IF and Vlookup Function

Quiz
•
9th - 10th Grade
10 questions
Comp Sci Unit 3 #9

Quiz
•
11th Grade
10 questions
10 question quiz on identifying and correcting errors

Quiz
•
9th - 12th Grade
11 questions
AP CSP MCQ Review Session 3 Quiz

Quiz
•
10th Grade
10 questions
AP CSP Boolean Logic 3

Quiz
•
9th - 12th Grade
12 questions
APCSA Unit 7

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
50 questions
Trivia 7/25

Quiz
•
12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
6 questions
RL.10.1 Cite Evidence

Quiz
•
10th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
14 questions
Algebra 1 SOL Review #1

Quiz
•
9th Grade