AP CSP Unit 7: Parameters, Returns, and Libraries
Flashcard
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

20 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which function calls would provide the most helpful test of this function? Remember: With tests, you are attempting to figure out all the possible ways the function could be broken. function findMin(num1, num2){ if(num1 < num2){ return num1; } else { return num2; }} Options: findMin(-1, 0) findMin(2,4) findMin(5,10), findMin(5,3) findMin(7,2) findMin(5,1), findMin(1,1) findMin(-2,2) findMin(0,3), findMin(-1,1) findMin(1,-1) findMin(1,1)
Back
findMin(-1,1) findMin(1,-1) findMin(1,1)
2.
FLASHCARD QUESTION
Front
listAverage() returns the average number in a list. Which of these functions does this correctly?
Back
3.
FLASHCARD QUESTION
Front
What is printed to the console?
console.log(15 % 4);
Back
3
4.
FLASHCARD QUESTION
Front
Which of the following is NOT true about procedural abstraction? Procedural abstraction improves code readability, Procedural abstraction manages complexity by allowing for code reuse, Procedural abstraction improves the speed at which a program executes, Procedural abstraction allows a solution to a large problem to be based on the solution of smaller subproblems
Back
Procedural abstraction improves the speed at which a program executes
5.
FLASHCARD QUESTION
Front
This function finds the minimum number in a list. What should <MISSING CODE SEGMENT> be replaced with in order for this function to operate as expected? function min(numList){ var min = numList[0]; for(var i=0; i<numList.length; i++){ if(numList[i] < min){ <MISSING CODE SEGMENT> } } return min; }
Back
min = numList[i];
6.
FLASHCARD QUESTION
Front
Algorithms can be created in all the following ways EXCEPT: creating from an idea, combining existing algorithms, removing sequencing, selection, and iteration from an algorithm, modifying existing algorithms
Back
removing sequencing, selection, and iteration from an algorithm
7.
FLASHCARD QUESTION
Front
Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT: reduces development time, reduces testing, simplifies debugging, removes procedural abstraction
Back
removes procedural abstraction
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
DSD II
Flashcard
•
9th - 12th Grade
15 questions
Geometry Final Exam Review
Flashcard
•
10th Grade
13 questions
Car Care-Chapter 16-Drivetrain
Flashcard
•
9th - 12th Grade
18 questions
CSOD Study Guide Questions
Flashcard
•
9th Grade
15 questions
Thanksgiving Trivia Function Review
Flashcard
•
9th Grade - University
10 questions
Smart Online Shopper
Flashcard
•
KG - University
13 questions
7517 03 Basic Operations in Programming Languages
Flashcard
•
9th Grade - University
15 questions
Final Exam 2024(Reg)
Flashcard
•
10th Grade - University
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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