What are the five common stages of computational thinking?
Computational thinking commonly involves decomposition, pattern recognition, abstraction, algorithm design, and evaluation.
Study 01 Programming Foundations and Problem Solving with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What are the five common stages of computational thinking?
Computational thinking commonly involves decomposition, pattern recognition, abstraction, algorithm design, and evaluation.
What does a compiler do?
A compiler translates source code, often as a whole program or module, into lower-level code such as machine code or intermediate code.
What is a runtime error?
A runtime error occurs while a program is running, such as when it attempts to divide by zero.
What is a variable?
A variable is a named reference to a value; assignment associates a name with a value or changes that association.
What does a conditional do?
A conditional selects which statements execute based on a Boolean expression.
How do `and`, `or`, and `not` differ?
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.
When should you use `for` versus `while`?
Use a `for` loop for each item in a collection or known sequence; use a `while` loop when repetition continues until a condition changes.
What prevents a loop from becoming infinite?
Every loop needs a clear termination condition and must make progress toward satisfying it; otherwise, it can become an infinite loop.
What is a function?
A function is a named, reusable operation that can receive parameters and return a result.
What is the difference between parameters and arguments?
Parameters are the names in a function definition; arguments are the values supplied when the function is called.
What index usually identifies an array's first element?
Array indexing often begins at zero, so the first element is at index `0`.
What is a class?
A class is a definition or blueprint used to create objects, called instances.