NEW
Font size
WorksheetsICS - Midterm Review (Fall 24)
Total questions: 60
Worksheet time: 55mins
The inputs and outputs that allow a user to interact with a piece of software.
Useful Interchange
User Input
User Interface
User Intention
Data that are sent to a computer for processing by a program.
Output
Screen
Input
User Interface
Any data that are sent from a program to a device.
Input
Output
Outdate
Program
A set of commands, instructions, and other syntax use to create a software program.
User Interface
Encryption
Coding
Programming Language
A collection of program statements. Programs run (or “execute”) one command at a time.
Program
Program Statement
Coding
Programming Language
Program statements run in order, from top to bottom.
Sequential Programming
Event Driven Programming
Some program statements run when triggered by an event, like a mouse click or a key press.
Sequential Programming
Event Driven Programming
What is a reason to include comments in a program?
Comments tell the computer what the code is doing.
Comments tell the programmer what the code is doing.
Comments help the user work an app more effectively.
Comments will show up in the console so when the program is run, the programmer know what happens.
How are shapes plotted on the screen?
with alphabet letters
with X and Y coordinates
using a touch screen
with width and height values
The x value represents...
How far away from the left of the screen
How far away from the right of the screen
How far away from the top of the screen
How far away from the bottom of the screen
The y value represents...
How far away from the right of the screen
How far away from the left of the screen
How far away from the bottom of the screen
How far away from the top of the screen
What is the origin of a square or rectangle?
The bottom right corner
The bottom left corner
The top right corner
The top left corner
What is the origin of a circle or ellipse?
The bottom left corner
The center
The bottom right corner
The top
In this line of code:
rect(250, 100);
which number is the y value?
rect
250
100
In this line of code: rect(250, 250, 100, 50); what do 100 and 50 represent?
The x and y values
The w and h values
The line of code: background("red"); will change what red?
Any shapes on the screen
The background
The foreground
Nothing
What does the randomNumber line of code do?
picks the same number every time
picks any number from zero to infinity
picks any number from the minimum and maximum that you set
it doesn't do anything
This line of code does what?
var hello = 100
creates a variable
names or labels the variable "hello"
sets the value of the variable hello to 100
All three are correct
Which command matches this block of code?
Creates a new sprite and assigns it to the variable specified.
Declares and assigns an initial value to a variable
Draws an ellipse onto the display centered at x and y and inscribed in a rectangle with sides length w(idth) and h(eight).
Which command matches this block of code?
Declares and assigns an initial value to a variable.
The number of times per second the screen is refreshed.
Returns a random number in the closed range from min to max.
Which command matches this block of code?
Draws an ellipse keeping the height to width ratio the same.
Shrink or grow a sprite keeping the height to width ratio the same.
Draws a rectangle keeping the height to width ratio the same.
Which command matches this block of code?
Displays a group of sprites. If no parameter is specified, draws all sprites in the sketch.
Shrink or grow a sprite keeping the height to width ratio the same.
The lines of code contained inside its block are continuously executed until the program is stopped.
Finding and fixing problems in an algorithm or program.
Bug
Variable
Property
Debugging
A graphic character on the screen with properties that describe its location,
Sprite
Property
Animation
Variable
A series of images that create the illusion of motion by being shown rapidly one after the other
Frame
Animation
Bug
In which direction will the sprite move?
bee.y = bee.y + 2
left
right
up
down
Which sprite property would you change to make the sprite turn in a circle?
sprite.x
sprite.y
sprite.scale
sprite.rotation
Which line of code is most likely to return an error?
1
2
3
4
Which command matches this block of code?
Draws an ellipse keeping the height to width ratio the same.
Shrink or grow a sprite keeping the height to width ratio the same.
Draws a rectangle keeping the height to width ratio the same.
Which direction will the sprite move in the code pictured? (Click on picture to enlarge.)
Left
Right
Up
Down
What keyboard key do you need press to move the sprite?
x
y
up arrow
space
What is the name of the sprite variable in the code pictured? (Click on picture to enlarge.)
fly
ladybug
bug
space
This plane looks like someone is smearing a stamp across a paper.
How would you fix this code so that it looks likes the plane is smoothly moving across the scene? (Click on image to enlarge.)
(line 8) increase the speed of the plane in the draw loop.
(line 7) add plane.rotation into the draw loop
(line 4) add a drawSprites
(line 3) move the background code into the draw loop so that it makes a new background each loop
Match the code with the output
Which command matches this block of code?
The number of times per second the screen is refreshed.
The lines of code contained inside its block are continuously executed until the program is stopped.
Creates a new sprite and assigns it to the variable specified.
