What is decomposition in programming?
Decomposition divides a large problem into smaller tasks with clear purposes, often implemented as independently understandable and testable functions.
Study 9 Fundamental Programming Techniques with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is decomposition in programming?
Decomposition divides a large problem into smaller tasks with clear purposes, often implemented as independently understandable and testable functions.
What initial value does a sum accumulator use?
Initialize an addition accumulator to 0. Other common identities are 1 for products, 0 for counts, [] for collections, and {} for key-value data.
How should Python test whether an item exists?
Use the `in` operator when only membership matters. A set is especially useful for repeated membership tests because it stores unique values.
What is an early return in a linear search?
A linear search examines items from beginning to end and can return immediately when it finds a match, avoiding unnecessary work.
Which Python tool provides an index and value together?
Use `enumerate` when both the position and the value of each item are needed during iteration.
What does filtering do to a collection?
Filtering keeps items that satisfy a condition, so it can change how many items are present. A list comprehension is concise for a simple filter.
How does transformation differ from filtering?
Transformation converts each input item into a corresponding output item; unlike filtering, the number of items usually remains the same.
What is the usual order of a data-processing pipeline?
A common pipeline obtains data, validates or cleans it, filters unwanted items, transforms the remainder, and then reduces or summarizes it.
Which four categories improve test-case coverage?
Typical, boundary, invalid, and special cases. Together they test ordinary inputs, limits, incorrect data, and situations such as duplicates or missing values.
What does a Python `assert` test?
An `assert` compares an actual result with an expected result and raises an `AssertionError` when the comparison fails.
What is a systematic debugging workflow?
Reproduce the failure, read the traceback, reduce it to a minimal example, inspect values, form one hypothesis, make one focused change, and retest.
How do syntax errors differ from runtime exceptions?
A syntax error prevents valid program structure, while an exception occurs during execution of a syntactically valid program.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
Learn how Boolean expressions, logical operators, and conditional structures let programs make reliable decisions, including how to handle boundaries, branch order, and testing.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A practical guide to integrating problem definition, data representation, modular programming, algorithms, complexity analysis, testing, correctness, and ethical evaluation into a responsible computer science capstone.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.