

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
LESSON - Classifying and Balancing Reactions
Presentation
•
9th - 12th Grade
21 questions
Area of Circles and Sectors and Segments
Presentation
•
9th - 12th Grade
22 questions
Experimental vs. Observational Studies
Presentation
•
9th - 12th Grade
22 questions
Tennis
Presentation
•
9th - 12th Grade
22 questions
U2L2. Ir & Ir a + infinitive
Presentation
•
9th - 12th Grade
22 questions
Argumentative Writing Terms
Presentation
•
9th - 12th Grade
20 questions
Los mandatos formales
Presentation
•
9th - 12th Grade
21 questions
Radical Equations Notes
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade