What is a program?
An algorithm that has been coded to be run by a computer.
This code is used to fill in a shape with a color
What is fill()
This is the name of place where all of the code that you make goes
What is the Workspace
What is a parameter?
Additional information provided as input to a block to customize its functionality.
What are the 4 steps of the Problem Solving Process?
Define, Prepare, Try, Reflect.
What’s the difference between an algorithm and a program?
An algorithm is a set of steps; a program is the coded version of those steps.
This code is used to edit the border of a shape
What is stroke()
In Game Lab, What do the parameters of ellipse(x, y, w, h) control?
x = horizontal position,
y = vertical position,
w = width (wideness)
h = height (longness)
What do you do during the “Define” step?
You figure out what the problem actually is and what you’re trying to solve.
What do we call a problem in code that stops it from working correctly?
A bug.
In Game Lab, what does the background() block do?
It fills the entire screen with a specific color
How many parameters does rect(x, y, w, h) have?
Four — x, y, width, and height.
What Block of Code is essential for Sprite use because without it they do not exist on screen?
Draw Sprites
During which step do you brainstorm ideas and make a plan before coding?
The Prepare step.
What is debugging?
Finding and fixing errors or bugs in your program.
What code is used to edit the border thickness (or the size of a point)?
What is strokeWeight()?
Why is it better to use parameters instead of repeating code?
It saves time, avoids mistakes, and makes code easier to update.
What Block of Code repeats a code over and over and over again
Draw Loop
If your first attempt doesn’t work, what should you do next?
Reflect on what went wrong and go back to Prepare or Try again.
Why is programming considered a creative activity?
Programmers use code to create original projects, art, or solutions.
What happens when you increase the x value of a shape?
It moves right across the screen.
What is the difference between writing code in block mode and text mode in Game Lab?
Block mode uses draggable blocks for beginners; text mode uses real JavaScript code.
A student’s code rect(100, 50, 75) doesn’t work. Why?
The rect() function needs four parameters — they’re missing the height.
CHALLENGE QUESTION (Everyone tries to answer, first team gets double points!):
You want to draw a house in Game Lab, but when you run the code, the door is floating above the roof instead of under it.
How would you use the Problem Solving Process to fix this issue?
Define: The door is in the wrong place.
Prepare: Check your code order and think about which shapes should draw first.
Try: Move the rect() command for the door to a spot after the roof code.
Reflect: Run the program again to see if the door is now in the right position.