Introduction to Computer Programming
Computer Programming for Secondary School Students
1. What is Computer Programming?
Computer programming is the process of writing instructions that a computer can follow to perform
specific tasks. These instructions are written using programming languages.
2. Importance of Programming:
- Helps in solving real-life problems using computers.
- Develops logical thinking and creativity.
- Foundation for careers in ICT and software development.
3. Common Programming Languages:
- BASIC: Beginner-friendly and widely used in schools.
- Python: Simple and modern language used globally.
- Java: Used in web and mobile applications.
- Scratch: A visual programming language ideal for beginners.
4. Programming Terms:
- Algorithm: A step-by-step solution to a problem.
- Flowchart: A diagram that represents an algorithm.
- Variable: A named storage location for data.
- Loop: Repeats a block of code (e.g., FOR, WHILE loops).
- Condition: A decision-making step using IF, ELSE.
5. Example in BASIC:
10 INPUT A
Page 1
Introduction to Computer Programming
20 INPUT B
30 LET C = A + B
40 PRINT C
50 END
6. Writing a Simple Algorithm:
Problem: Calculate the sum of two numbers.
Algorithm:
Step 1: Start
Step 2: Input first number
Step 3: Input second number
Step 4: Add the two numbers
Step 5: Display the result
Step 6: Stop
7. Characteristics of a Good Program:
- Correctness: Produces accurate results.
- Simplicity: Easy to read and understand.
- Efficiency: Uses minimal resources.
- Modularity: Divided into small, manageable parts.
8. Tools for Learning Programming:
- Text editors (e.g., Notepad, VS Code)
- IDEs (e.g., Scratch, Thonny for Python)
- Online platforms (e.g., Replit, Code.org)
Page 2
Introduction to Computer Programming
9. Careers in Programming:
- Software Developer
- Web Developer
- Data Scientist
- Game Developer
- Mobile App Developer
Learning to program prepares students for modern careers and improves problem-solving abilities.
Page 3