Programming Basics
Code
Code.org
Shapes and Parameters
Problem Solving Process
100

What is a program?

An algorithm that has been coded to be run by a computer.

100

This code is used to fill in a shape with a color

What is fill()

100

This is the name of place where all of the code that you make goes

What is the Workspace

100

What is a parameter?

Additional information provided as input to a block to customize its functionality.

100

What are the 4 steps of the Problem Solving Process?

Define, Prepare, Try, Reflect.

200

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.

200

This code is used to edit the border of a shape

What is stroke()

200

What tool do we use to create animations and games in Code.org?

Game Lab

200

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)

200

What do you do during the “Define” step?

You figure out what the problem actually is and what you’re trying to solve.

300

What do we call a problem in code that stops it from working correctly?

A bug.

300

In Game Lab, what does the background() block do?

It fills the entire screen with a specific color

300

How many parameters does rect(x, y, w, h) have?

Four — x, y, width, and height.

300

What Block of Code is essential for Sprite use because without it they do not exist on screen?

Draw Sprites

300

During which step do you brainstorm ideas and make a plan before coding?

The Prepare step.

400

What is debugging?

Finding and fixing errors or bugs in your program.

400

What code is used to edit the border thickness (or the size of a point)?

What is strokeWeight()?

400

Why is it better to use parameters instead of repeating code?

It saves time, avoids mistakes, and makes code easier to update.

400

What Block of Code repeats a code over and over and over again

Draw Loop

400

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.

500

Why is programming considered a creative activity?

Programmers use code to create original projects, art, or solutions.

500

What happens when you increase the x value of a shape?

It moves right across the screen.

500

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.

500

A student’s code rect(100, 50, 75) doesn’t work. Why?

The rect() function needs four parameters — they’re missing the height.

500

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?

  1. Define: The door is in the wrong place.

  2. Prepare: Check your code order and think about which shapes should draw first.

  3. Try: Move the rect() command for the door to a spot after the roof code.

  4. Reflect: Run the program again to see if the door is now in the right position.