CSS Computer Science (Optional) — Paper-I, Section-A, Topic II subtopic. Covers the design tools used to plan a program before coding.
Core Concepts
- Algorithm: a finite, ordered sequence of unambiguous steps to solve a problem
- Flowchart: graphical representation of an algorithm using standard symbols
- Pseudocode: informal, structured English-like description of an algorithm's logic, independent of any specific programming language syntax
- Top-down design / Stepwise refinement: breaking a large problem into smaller sub-problems (modules), then refining each module in successive steps of detail until it's simple enough to code directly
- Modularity: dividing a program into independent, reusable modules/functions — improves readability, testing, and maintenance
Properties of a Good Algorithm
- Finiteness — must terminate after a finite number of steps
- Definiteness — every step must be precisely and unambiguously defined
- Input — zero or more well-defined inputs
- Output — one or more well-defined outputs
- Effectiveness — each step must be basic enough to be carried out, in principle, by a person using pencil and paper
Flowchart Symbols
| Symbol |
Shape |
Meaning |
| Oval / Terminator |
Rounded ends |
Start / End of the algorithm |
| Parallelogram |
Slanted sides |
Input / Output |
| Rectangle |
Straight sides |
Process / Computation / Assignment |
| Diamond |
Rhombus |
Decision (Yes/No branch) |
| Arrow |
Line with arrowhead |
Flow of control/direction |
| Circle |
Small circle |
Connector (joins flow across a page break) |
Pseudocode Conventions
- Uses plain English keywords like
BEGIN/END, IF/ELSE/ENDIF, WHILE/ENDWHILE, READ, WRITE/PRINT
- Indentation shows nesting/structure, just like real code
- No strict syntax rules — the goal is clarity of logic, not compilability
Worked Example: Find the Largest of Two Numbers