Computational Thinking
1. What is an Algorithm?
An Algorithm is a set of step-by-step instructions used to solve a specific problem or complete a task.
An algorithm must be finite (it must end), unambiguous (clear instructions), and effective (it must actually solve the problem).
2. Key Concepts in Computational Thinking
Abstraction
The process of filtering out unnecessary details and focusing only on the information needed to solve the problem.
Example: A map of a subway doesn't show buildings or trees, only the stations and lines.
Decomposition
Breaking down a complex problem into smaller, more manageable sub-problems that are easier to solve individually.
Example: Breaking the task of "Making a Cake" into "Buying ingredients," "Mixing," and "Baking."
3. The Program Development Life Cycle (PDLC)
Developing software is a structured process. Each stage depends on the completion of the previous one.
4. Testing: Ensuring Accuracy
During the testing stage, we use different types of data to see if the program breaks. Here is the Testing Toolkit at a glance:
- Normal Data: Expected data that should be accepted (e.g., age 25).
- Abnormal/Erroneous Data: Data of the wrong type or outside limits that should be rejected (e.g., "twenty" or -5).
- Extreme Data: The largest and smallest values at the very edges of the valid range (e.g., 1 and 100).
- Boundary Data: Pairs of values at the limit: one just valid (e.g., 100) and one just invalid (e.g., 101).