Programming Basics
Algorithms, pseudocode, flowcharts and basic programming concepts
Programming = giving a computer step-by-step instructions to solve a problem.
Algorithm: A precise sequence of steps to solve a problem. Qualities: clear, unambiguous, finite, terminates.
Pseudocode is English-like code (not a real language — just structured logic):
```
INPUT name
OUTPUT "Hello " + name
```
Flowchart symbols:
Variables: Named storage locations. Data types: **integer** (whole number), **real/float** (decimal), **string** (text), **Boolean** (True/False).
Sequence, Selection, Iteration:
Dry run / Trace table: Manually follow an algorithm step by step, recording variable values — used to find bugs without running the program.
Key Points to Remember
- 1Algorithm: clear, unambiguous, finite steps
- 2Flowchart: oval=start/end, diamond=decision, rectangle=process
- 3Sequence, selection (IF), iteration (loops)
- 4Trace table: manually track variable values
Pakistan Example
Apps Built by Pakistani Students — Coding in the AKU Context
Students at Aga Khan schools in Karachi have built apps for tracking timetables, prayer times, and food ordering for school canteens. AKU-EB Computer Studies exams ask students to write pseudocode for real problems — like calculating a student's average marks or checking if a PIN is correct (selection). Pakistani students at Aga Khan schools increasingly use Python to prototype these ideas.