Free Online Flashcard Deck

01 Programming Foundations and Problem Solving Free Online FlashCards

Study 01 Programming Foundations and Problem Solving with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What are the five common stages of computational thinking?

Back

Computational thinking commonly involves decomposition, pattern recognition, abstraction, algorithm design, and evaluation.

02
Front

What does a compiler do?

Back

A compiler translates source code, often as a whole program or module, into lower-level code such as machine code or intermediate code.

03
Front

What is a runtime error?

Back

A runtime error occurs while a program is running, such as when it attempts to divide by zero.

04
Front

What is a variable?

Back

A variable is a named reference to a value; assignment associates a name with a value or changes that association.

05
Front

What does a conditional do?

Back

A conditional selects which statements execute based on a Boolean expression.

06
Front

How do `and`, `or`, and `not` differ?

Back

The `and` operator is true only when both conditions are true; `or` is true when at least one condition is true; `not` reverses a Boolean value.

07
Front

When should you use `for` versus `while`?

Back

Use a `for` loop for each item in a collection or known sequence; use a `while` loop when repetition continues until a condition changes.

08
Front

What prevents a loop from becoming infinite?

Back

Every loop needs a clear termination condition and must make progress toward satisfying it; otherwise, it can become an infinite loop.

09
Front

What is a function?

Back

A function is a named, reusable operation that can receive parameters and return a result.

10
Front

What is the difference between parameters and arguments?

Back

Parameters are the names in a function definition; arguments are the values supplied when the function is called.

11
Front

What index usually identifies an array's first element?

Back

Array indexing often begins at zero, so the first element is at index `0`.

12
Front

What is a class?

Back

A class is a definition or blueprint used to create objects, called instances.