
AP CSP Review Session 2
Authored by Lewis Boble
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
3 mins • 1 pt
A homework assignment consists of 10 questions. The assignment is graded as follows.
9-10 correct --> check plus
7-8 correct --> check
Under 7 correct --> check minus
Let numCorrect represent the number of correct answers for a particular student. The following code segment is intended to display the appropriate grade based on numCorrect. The code segment does not work as intended in all cases.
For which of the following values of numCorrect does the code segment NOT display the intended grade? Select two answers.
9
8
7
6
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In the following procedure, the parameter numList is a list of numbers and the parameters j and k are integers.
Which of the following is the most appropriate documentation to appear with the swapListElements procedure?
Returns a copy of numList with the elements at indices j and k interchanged.
The value of j must be between 0 and the value of k, inclusive.
Returns a copy of numList with the elements at indices j and k interchanged.
The values of j and k must both be between 1 and LENGTH(numList), inclusive.
Interchanges the values of the parameters j and k.
The value of j must be between 0 and the value of k, inclusive.
Interchanges the values of the parameters j and k.
The values of j and k must both be between 1 and LENGTH(numList), inclusive.
3.
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]
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In the following code segment, score and penalty are initially positive integers. The code segment is intended to reduce the value of score by penalty. However, if doing so would cause score to be negative, score should be assigned the value 0.
For example, if score is 20 and penalty is 5, the code segment should set score to 15. If score is 20 and penalty is 30, score should be set to 0.
The code segment does not work as intended.
Which of the following changes can be made so that the code segment works as intended?
Changing line 1 to IF(score < 0)
Changing line 1 to IF(score + penalty < 0)
Changing line 7 to score <-- score + penalty
Interchanging lines 3 and 7
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In the following procedure, the parameter max is a positive integer.
Which of the following is the most appropriate documentation to appear with the printNums procedure?
Prints all positive even integers that are less than or equal to max.
Prints all positive odd integers that are less than or equal to max.
Prints all positive even integers that are greater than max.
Prints all positive odd integers that are greater than max.
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
In the following procedure, the parameters x and y are integers.
Which of the following is the most appropriate documentation to appear with the calculate procedure?
Displays the value of x + (y / x).
The value of the parameter x must not be 0.
Displays the value of x + (y / x).
The value of the parameter y must not be 0.
Displays the value of (x + y) / x.
The value of the parameter x must not be 0.
Displays the value of (x + y) / x.
The sum of the parameters x and y must not be 0.
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
Quiz 5 - Excel
Quiz
•
11th Grade
10 questions
MEDIA AND INFORMATION LITERACY
Quiz
•
12th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
11 questions
HEALTH AND SAFETY 9
Quiz
•
7th - 9th Grade
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)
Quiz
•
11th - 12th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
20 questions
Exponent Properties
Quiz
•
9th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade