NEW
Font size
WorksheetsUnit 1 Exam
Total questions: 35
Worksheet time: 3hrs 55mins
How many times will the word “Yellow” be displayed
1
2
3
60
How many times will the word “Orange” be displayed
1
2
3
60
120
How many times will the word “Blue” be displayed
1
2
3
60
120
What two concepts does the code primarily demonstrate?
Input and Selection
Output and Iteration
Output and Selection
Event-Driven Programming and Selection
Event-Driven Programming and Iteration
How many times will the word “Pencil” be displayed
1
2
6
24
120
How many times will the word “Eraser” be displayed
1
2
6
24
120
How many times will the word “Paper” be displayed
1
2
6
24
120
How many times will the word “Marker” be displayed
1
2
24
120
What are the possible results of this expression?
2, 8
2, 3, 4, 5, 6, 7
2, 3, 4, 5, 6, 7, 8
3, 4, 5, 6, 7
3, 4, 5, 6, 7, 8
What are the possible results of the expression?
1, 2, 3
1, 2, 3, 4, 5
1, 3, 5, 7, 9
3, 4, 5
4, 5, 6, 7
What are the possible results of this expression?
RANDOM(1,5) * 3
1, 2, 3, 4, 5
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
3, 6, 9, 12, 15
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
5, 10, 15
What is the result of the following expression?
2
3
5
7
9
What is the result of the following expression?
2
3
5
7
9
What is the result of the following expression?
(20 MOD 11) - (2 MOD 5)
2
3
5
7
9
What are the two components of abstraction?
sequencing and iteration
sequencing and detail removal
generalization and iteration
detail removal and iteration
detail removal and generalization
Why are parameters important part of procedural abstraction?
They allow programmers to generalize patterns of code to be executed.
They trigger pieces of code to be run in response to an event taking place.
They give programmers a tool for repetition through looping.
They serve as a means of documenting code.
They are the means to displaying data on the screen.
Which statement is most true about procedural abstraction?
Procedural abstraction breaks down programs into less manageable pieces.
Procedural abstraction allows programmers to generalize functionality instead of duplicating code.
Procedural abstraction reduces the number of commands the computer needs to execute.
Procedures can be declared multiple times but are only called once.
Employing procedures as program documentation is considered a best practice.
A potential development process includes the following three phases:
design -> implement/coding -> testing .
In which phase would you be programming your solution?
Testing
Design
Implementation
Abstraction
None of the above
A potential development process includes the following three phases:
design -> implement/coding -> testing.
In which phase would you be more likely to be looking for errors in your code?
Design
Implementation
Testing
Abstraction
None of the above
What is event-driven programming?
When a program contains no interaction with the user
When a program’s code is triggered by certain actions occurring, such as mouse clicks
When a program’s code contains detail removal and generalization through parameters
When a program executes it’s entire code run in sequential order
When a program doesn’t run due to errors
Which of the following programming commands is related to the concept of program output.
RANDOM(1, 10)
DISPLAY(“Hello World”)
10 MOD 5
INPUT()
None of the above
Which of the following are examples of program output?
Arguments to procedure input variables
Video and text on the screen
Pressings keys on the keyboard
Using the mouse to click on sprites
All of the above
Which of the following is true about event-driven programming?
Event-driven programming always executes code in sequential order
Event-driven programming needs sequencing and iteration
Event-driven programming always includes detail removal and generalization
An “event” ensures that a piece of code is repeated
An “event” can occur as a response to a user action, like pushing a key on the keyboard
Which statement accurately describes the use of comments in programming?
Comments can assist programmers in keeping track of the functionality of their code.
Comments are used to conceal the implementation details of the code.
Comments are responsible for triggering the execution of program code in event-driven programs.
Comments can potentially cause program execution to slow down under specific circumstances.
Comments are discouraged when programming collaboratively.
The image below shows the result of calling a procedure named “draw square” which has a parameter named “size”.
Which of the following procedure definitions, when called, will result in a square being drawn as shown above?
None of the above
What will be output when the following program is run?
x y z
x x y z
x y z x y z
x x y z x y z
x x y z x x y z
What will be the order of greetings printed to the screen when this program is run?
Hello – Howdy
Hello – Howdy – Good morning – How are you?
Hello – Howdy – Good morning – How are you? – Good morning – How are you?
Hello – Good morning – How are you? – Howdy
Hello – Good morning – How are you? – Good morning – How are you? – Howdy
Which expression will return a random even number between 1 and 10?
RANDOM(1, 10)
RANDOM(2, 10)
RANDOM(1, 10) / 2
2 * RANDOM(1, 5)
2 * RANDOM(1, 10)
A die is a cube with 6 sides, each side marked with a number from 1 to 6. If you were to throw (“roll”) a die, there is an equal probability that it will land on any of the numbers, 1 through 6, facing up.
Which of the following simulates a die roll displayed to the screen?
DISPLAY( RANDOM(0, 6) )
DISPLAY(“RANDOM 0 to 6”)
DISPLAY( RANDOM(1, 6) )
DISPLAY(“RANDOM 1 to 6”)
None of the above
Which of the following answer choices best describes procedures?
A mechanism for storing and using program data.
A sequence of characters, including letters, numbers, and symbols.
A set of instructions that are repeated a specific number of times.
A set of instructions that enable programs to branch and skip executing code.
A collection of statements that can be reused as needed.
What will be the result of executing the following Snap! expression?
2
3
4
5
6
What will be the result of executing the following expression?
(9 / 3) + ((2 * 2) – 3)
2
3
4
5
6
What will be the result of executing the following Snap! expression?
2
3
4
5
6
What will be the result of executing the following expression?
30 MOD 8
2
3
4
5
6
What will be displayed after calling the following procedure?
1, 2, 3, 4, 5
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
2, 4, 6, 8, 10
2, 4, 6, 8, 10, 12, 14, 16, 18, 20
