AP CSP Identifying Errors
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Stephanie Kimbrough
Used 5+ times
FREE Resource
Enhance your content in a minute
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?
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?
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]
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Tree
Quiz
•
12th Grade
15 questions
Tekper Bab3
Quiz
•
10th Grade
11 questions
Kuiz ASK T3 - BAHAGIAN B SET 1
Quiz
•
9th Grade
10 questions
Grade 11 Term 4 Practice 2
Quiz
•
11th Grade
10 questions
AI and Python: Ch.1 Revision
Quiz
•
9th Grade
14 questions
Computing figures
Quiz
•
4th - 12th Grade
15 questions
End of term assessment
Quiz
•
9th Grade
10 questions
Keyboarding Terms
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
