

Computer Science Principles Unit 7 Review
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Cory Bougher
Used 56+ times
FREE Resource
15 Slides • 13 Questions
1
Computer Science Principles Unit 7 Review
Parameters & Libraries

2
Modulo
the remainder of a division problem
will be either even or odd
called MOD
shown as %
3
Multiple Choice
Which of the following shows an EVEN modulo?
num % 2 = 0
num % 2 = 1
4
Multiple Choice
What is printed in the console for (17 % 6)?
1
2
3
4
5
Procedural Abstraction
When you don't need to know/understand every detail of a block of code - just the overall functionality
6
Modularity
separating the functionality of a program into independent, interchangeable modules
7
Multiple Choice
Which term refers to a solution to a large problem that is based on the solutions of smaller subproblems?
modularity
library
procedural abstraction
API
8
Multiple Choice
Dividing a program into separate subprograms (such as libraries) is known as:
modularity
library
procedural abstraction
API
9
Algorithms
10
Multiple Choice
Algorithms can be created in all the following ways EXCEPT:
combining existing algorithms
removing sequencing, selection, and iteration from an algorithm
modifying existing algorithms
11
Multiple Choice
Using existing algorithms as building blocks for new algorithms has all the following benefits EXCEPT:
removes procedural abstraction
simplifies debugging
reduces development time
12
Libraries
13
Multiple Choice
What is one of the benefits of using a library in a program?
increases development time
simplifies creating a complex program
removes all testing
reduces abstractions in the program
14
Debugging Tips
check for spelling/capitalization errors
check for symbol errors ( { [ " ' ; : & ==
is something blank?
is a variable named but not called?
is the loop infinite?
then check your logic sequentially
use console.logs to see what is running
15
Functions, Parameters, Values, Returns
function should be named for what it does
parameter with a value or argument will be passed to the function to return something
return should also be descriptive
16
Functions that use Loops with Booleans
This function called "filter" is using a loop to run through length of a list and compare something in the list to a specific criteria. If true, certain code runs. If false, another code runs instead.
17
18
Multiple Choice
This function checks if a character is a vowel. If it is, it returns true. Otherwise, it returns false. Where should return false; be written in the code?
OPTION A
OPTION B
OPTION C
19
20
Multiple Choice
What will be printed to the console after this program runs?
[2, 7, 6, 4, 5]
[5, 3, 1, -1, 9]
[2, 5, 3, 1, 6]
21
22
Multiple Choice
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?
numList[i] = min;
min = numList[i];
min = numList;
numList = min;
23
24
Multiple Choice
You have imported a library with the anniversaryYear() function. Based on the API, how many strings are imputed to calculate the anniversary month?
0
1
2
3
25
API & Consistent Syntax
This API describes how to move an element. When the function is called, the id, direction, and amount should be programmed consistently (use strings or numbers in the same way throughout).
26
Multiple Choice
Which syntax of the function correctly follows the instructions laid out in the API?
moveElement("button1", 2, 23);
moveElement("button1", "up", 25);
moveElement("button1", "left", "thirty");
moveElement("button1", 30, "two");
27
28
Multiple Choice
Here is the API for a robot library. Which code segment will guarantee that the robot makes it to the grey square without hitting a wall or a barrier (black square)?
Computer Science Principles Unit 7 Review
Parameters & Libraries

Show answer
Auto Play
Slide 1 / 28
SLIDE
Similar Resources on Wayground
21 questions
The Great Pacific Garbage Patch
Presentation
•
9th - 12th Grade
21 questions
Conditional Tense
Presentation
•
9th - 12th Grade
22 questions
Verbo IR (to go)
Presentation
•
9th - 12th Grade
22 questions
Population Data Lesson
Presentation
•
9th - 12th Grade
24 questions
history of computers
Presentation
•
10th - 12th Grade
23 questions
Welcome Back Day 2
Presentation
•
9th - 12th Grade
21 questions
Preterite tense
Presentation
•
9th - 12th Grade
21 questions
Systems of Equations Word Problems
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
5 questions
A Home on the Shore
Quiz
•
3rd Grade
28 questions
US History Regents Review
Quiz
•
11th Grade
6 questions
A Horse Tale
Quiz
•
3rd Grade
20 questions
Math Review
Quiz
•
3rd Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
20 questions
Dividing Fractions
Quiz
•
5th Grade
55 questions
A Long Walk to Water Final Review
Quiz
•
6th - 8th Grade
10 questions
Equation Word Problems
Quiz
•
7th Grade
Discover more resources for Computers
28 questions
US History Regents Review
Quiz
•
11th Grade
20 questions
Insurance
Quiz
•
9th - 12th Grade
10 questions
Juneteenth: History and Significance
Interactive video
•
7th - 12th Grade
10 questions
7.3-7.4 Quiz
Quiz
•
11th Grade
20 questions
Summer Geometry QUIZ (Week 2)
Quiz
•
9th Grade
6 questions
Mayan Mathematics part 1
Presentation
•
9th - 12th Grade
25 questions
Biology Regents Review
Quiz
•
9th Grade
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...