
AP CSP Unit 7 Review
Authored by Hannah Chu
Computers
11th Grade
Used 72+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will be printed to the console after this program runs?
var numbers = [2, 5, 3, 1, 6]
function changeNums(numList, addNum, subtractNum){
for(var i=0; i<numList.length; i++){
if(numList[i] % 3 == 0){
numList[i] = numList[i] + addNum;
} else {
numList[i] = numList[i] - subtractNum;
}
}
}
changeNums(numbers, 3, 2);
console.log(numbers);
[2, 5, 3, 1, 6]
[0, 3, 6, -1, 9]
[-1, 2, 6, -2, 8]
[5, 2, 6, 3, 9]
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
This function checks if a number is prime. If it contains another factor besides 1 and itself, it returns false. Otherwise, it returns true.
Where should return true; be written in the code?
OPTION A
OPTION B
OPTION C
OPTION D
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which call of the function correctly follows the instructions laid out in the API?
moveElement("button1", 2, 23);
moveElement("button1", "left", "thirty");
moveElement("button1", 30, "two");
moveElement("button1", "down", 25);
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Parameters are different than arguments
True
False
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will print to the console after running this code segment?
15
16
21
18
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which of the following procedures would be most useful as part of a program to determine whether a word appears in two different text files?
A procedure getWords, which takes a positive integer n and a text file as input and returns the first n words in the text file.
A procedure textMatch, which takes two text files as input and returns true if the two text files are identical.
A procedure isFound, which takes a word and a text file as input and returns true if the word appears in the text file
A procedure sameSize, which takes two text files as input and returns true if the two text files contain the same number of words.
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
A computer science student completes a program and asks a classmate for feedback. The classmate suggests rewriting some of the code to include more procedural abstraction.
Which of the following is NOT a benefit of procedural abstraction?
Making the code run faster
Making the code more readable
Providing more opportunities for code reuse
Reducing the amount of duplicated code
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
20 questions
Design your website
Quiz
•
7th - 12th Grade
20 questions
Changes & Managing Modern Teams
Quiz
•
10th - 11th Grade
20 questions
Jaringan Komputer
Quiz
•
9th - 12th Grade
20 questions
Alles über YouTube
Quiz
•
5th Grade - University
20 questions
SOAL PAS INFORMATIKA
Quiz
•
11th Grade
21 questions
QUIZ #4 LESSON 4
Quiz
•
11th Grade
20 questions
Colour Theory
Quiz
•
3rd Grade - University
21 questions
Computer System
Quiz
•
9th - 11th 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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
22 questions
El Imperfecto
Quiz
•
9th - 12th Grade
15 questions
ACT Reading Practice
Quiz
•
11th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
20 questions
verbos reflexivos en español
Quiz
•
9th - 12th Grade
14 questions
Making Inferences From Samples
Quiz
•
7th - 12th Grade
23 questions
CCG - CH8 Polygon angles and area Review
Quiz
•
9th - 12th Grade
8 questions
Momentum and Collisions
Lesson
•
9th - 12th Grade