Computer Studies (AKU-CS)
Topic 2 of 7Aga Khan Board

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:

  • Oval: Start/End
  • Rectangle: Process (calculation, assignment)
  • Diamond: Decision (yes/no question → branch)
  • Parallelogram: Input/Output

  • Variables: Named storage locations. Data types: **integer** (whole number), **real/float** (decimal), **string** (text), **Boolean** (True/False).


    Sequence, Selection, Iteration:

  • Sequence: Instructions run in order
  • Selection: IF condition THEN action ELSE other action (branching)
  • Iteration: Loops — FOR (fixed count), WHILE (condition-based)

  • 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.

    Test Your Knowledge!

    3 questions to check if you understood this topic.

    Start Quiz