Variables, Operators, and Logic
Boolean Logic & Conditionals
Lists, Indexes, and Loops
Functions, Parameters, and Modularity
Debugging, Design, and Problem Solving
100

What does the assignment operator do in a program?

Stores a value

100

What are the only two possible values of a Boolean expression?

True and false

100

In a zero-indexed list, what index stores the first item?

0
100

What is a named block of code that can be called later?

Function

100

What debugging tool prints variable values while a program runs?

console.log

200

What is the result of 14 % 4?

2

200

Which logical operator is true only when both sides are true?

AND

200

If a list has 6 items, what is the index of the last item?

5

200

What is a placeholder variable in a function definition called?

Parameter

200

What debugging strategy means walking through code step by step by hand?

Manual tracing

300

If x starts at 8, what is x after x = x + 1?

9

300

What is the result of NOT false?

True

300

What command adds a new item to the end of a list?

appendItem

300

What is the actual value passed into a function called?

Argument

300

Why might a programmer comment out part of a program while debugging?

To isolate the problem

400

Why is x = x + 1 valid in programming but not as a math equation?

It updates memory

400

Why does an else block run only after all previous conditions fail?

It is the default case

400

A list is [5, 10, 15, 20]. After removeItem(list, 1), what is the list?

[5, 15, 20]

400

Why does procedural abstraction reduce duplicate code?

Repeated steps are put in one function

400

A program runs without crashing but gives the wrong total. Which strategy best helps track the changing values?

Manual code tracing

500

A program needs to check whether a number is odd. What condition should it use?

num % 2 == 1

500

A score is 85. The first condition checks score > 90, and the else if checks score > 80. Which branch runs?

The else if branch

500

A loop goes through every score in a list and builds a new list of only passing scores. What traversal pattern is this?

Filtering

500

A function calculate(n) returns n * 2 + 1. What does calculate(5) return?

11

500

Why do functions, tracing, and testing all support better problem solving in programming?

They manage complexity

M
e
n
u