Loops
Variables
Operations
Functions
Logic
100

In coding, what does REPEAT mean?

Do the same steps again.

100

What does SET score = 0 mean?

Create/store a variable named score with value 0.

100

hat does an operation do in code?

Performs math/calculations on values.

100

What is a function in coding (in simple terms)?

A named recipe of steps you can reuse.

100

A condition in coding has only two possible results. What are they?

True / False.

200

If you REPEAT 4 times and each time you add 2 points, how many points total did you add?

8.

200

If coins = 3 and you pick up 2 more, what is coins now?

5
200

If x = 10 then you do x = x - 4, what is x now?

6
200

Why use a function instead of rewriting the same steps in 5 places?

Saves time, reduces mistakes, easier to edit.

200

IF the rule is “level ≥ 5” and the level is 3, does the IF part run?

No.

300

A loop is best for which job: (A) storing a name, (B) repeating a step 10 times, (C) checking a rule once?

  • B.


300

hich is a better variable name for “how many lives left”: (A) x, (B) l, (C) livesLeft

C

300

A game gives 3 points per win. You win 6 times. What is your total?

18.

300

A function called double takes an input number and outputs twice it. If the input is 7, what is the output?

14.

300

IF score ≥ 10 then “Win” ELSE “Try Again.” If score is 10, what happens?

Win

400

A loop runs while a rule is true. The rule is “battery > 0.” What should happen to battery inside the loop so it eventually stops?

Battery should decrease (so it reaches 0).

400

What type of variable stores text inside quotes?

A string

400

In coding, the “leftover after dividing” is useful for checking even/odd. What are the possible leftovers when dividing by 2?

0 or 1

400

A function input is often called what?

A parameter (or “input”).

400

Which rule is stricter: “score > 10” or “score ≥ 10”?

“score > 10” is stricter.

500

You expected a loop to run 5 times, but it keeps going forever. What kind of bug is this?

An infinite loop.

500

You want to store a student’s grade level (like 7). Should that variable be String or Int?

Int 

500

You divide 17 cookies among 5 people equally. How many cookies are left over?

2.

500

What’s the difference between a function that prints an answer and a function that returns an answer?

Print = shows it on screen; Return = gives the value back so the program can use/store it.

500

A programmer wants a rule that is true when a number is even. What should be true about its leftover when dividing by 2?

0

M
e
n
u