AP CSP Unit 7: Parameters, Returns, and Libraries

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

21 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which code segment results in "true" being returned if a number is even? Replace "MISSING CONDITION" with the correct code segment.
function isEven(num){
if(MISSING CONDITION){
return true;
} else {
return false;
}
}
Back
num % 2 == 0;
2.
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; }}
Back
findMin(-1,1)
findMin(1,-1)
findMin(1,1)
3.
FLASHCARD QUESTION
Front
listAverage() returns the average number in a list. Which of these functions does this correctly?
Back
4.
FLASHCARD QUESTION
Front
What is printed to the console?
console.log(15 % 4);
Back
3
5.
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.
6.
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];
7.
FLASHCARD QUESTION
Front
Algorithms can be created in all the following ways EXCEPT: creating from an idea, combining existing algorithms, modifying existing algorithms
Back
removing sequencing, selection, and iteration from an algorithm
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Types of Modeling in Engineering

Flashcard
•
9th - 12th Grade
15 questions
Levels 1-3: Unit 1- Parent Functions/Tran

Flashcard
•
9th - 12th Grade
17 questions
Is it a function

Flashcard
•
9th - 12th Grade
15 questions
Parent Functions

Flashcard
•
9th - 12th Grade
15 questions
Parent Functions Homework

Flashcard
•
9th - 12th Grade
15 questions
Parent functions

Flashcard
•
9th - 12th Grade
21 questions
AP CSP Unit 3 Review

Flashcard
•
10th - 12th Grade
16 questions
AP CSP Unit 1

Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade