NEW
Font size
WorksheetsComputer Science Semester Exam Review
Total questions: 20
Worksheet time: 10mins
How is a function similar to a car engine?
A) Functions can be turned on or off just like a car engine.
B) Functions are repeatable code, just like how you can use a car engine multiple times.
C) Functions and car engines both have batteries.
D) Functions work best with more parameters, just like car engines.
What needs to happen for the Theater Door to Open?
Age must be greater than or equal to 17.
The movieTicket must equal true.
Age must be greater than or equal to 17 and movieTicket must equal true.
Age must be greater than 17 and the movie ticket needs to exist.
What will Coach say?
The Coach will say 0.
The Coach will say 2.
The Coach will say 1.8.
The Coach will say 1.
What will happen when Play is clicked?
The Cat will run on Round path forever.
The Cat and Dog will run parallel on Round path for 5 seconds.
The Dog will run on Round path forever and the Cat will run on Round path for 5 seconds.
The Cat and Dog will run parallel on Round path forever.
What is the parameter and argument of the My Height function?
The parameter is currHeight and the argument is 5.5.
The parameter is currHeight and the argument is newGrowth.
The parameter is 5.5 and the argument is currHeight.
The parameter is newGrowth and the argument is 0.2.
What will the Engineer say?
The Engineer will say 8.
The Engineer will say 20.
The Engineer will say 28.
The Engineer will say 0.
Which of the following describes a function?
Functions are reusable.
Functions cannot call other functions.
Functions must have a parameter.
Functions can only be used once.
A parameter is a piece of passed into a function or method.
Programming language
Commentation
Boolean
An argument is a value provided to a function for the function to .
Stop
Delete
What is happening when one block of code is inside another block of code?
Boolean statement
Stacking
Nesting
Conditional statement
Which of the following CoBlocks changes how fast a fall falls?
Set [Object] static to on
Set [Object] friction to 1
Set [Object] bounciness to 1
Set [Object] collision with other items to on
What will the Reader say? Refer to the code blocks shown in the diagram. When Play is clicked, the variable favSeries is set to "Hunger Games" and then to "Harry Potter". The code checks if favSeries is equal to "Harry Potter" and then the Reader says favSeries. What will the Reader say?
"favSeries"
"Harry Potter"
"Hunger Games"
"Favorite Book Series"
What two conditions must be met in order to make the Principal say “Permission!”?
The variable attendance must equal true.
The variable grades must equal true.
The variable grades must equal false.
Both the attendance and grades variables must equal true.
What will the Librarian say?
0.75
8
7
7.75
What will the Teacher say?
77
60
18
62
What will the Teacher say?
Nothing, because myNum is not less than 8.
The Teacher will say “6.7 is less than 8”.
The Teacher will say “3.3 is less than 8”.
The Teacher will say 10.
How is a loop similar to a running on a track?
Running on a track requires energy, similar to how loops require energy to run.
Running on a track involves running in a repetitive pattern, similar to how loops are used for repeating a set of instructions multiple times
Running on a track is typically timed, similar to how loops take a long time to complete.
Tracks have hurdles, similar to how loops have hurdles to overcome.
How many seconds will it take for the CoBlock when Play is clicked to run?
12 seconds
2 seconds
14 seconds
14 seconds
How is a forever loop similar to hands on a clock?
Both forever loops and hands on a clock iterated in only one direction.
Both forever loops and hands on a clock stop after a certain number of iterations.
Both forever loops and hands on a clock operate only during certain hours of the day.
Both forever loops and hands on a clock repeat indefinitely.
How long will take for the code to run when Play is clicked?
The Cow will say “Moo” for 2 seconds.
The Cow will say “Moo” for 2 seconds and the Chicken will say “Cluck” for 2 seconds.
The Cow will say “Moo” for 2 seconds. The Chicken will say “Cluck” for 2 seconds, repeating in a forever loop.
The cow will say “Moo” for 2 seconds and the Chicken will say “Cluck” for 4 seconds.
