1. Introduction to Programming
Programming is the process of writing a set of instructions, called a program, that a computer can execute to perform a specific task. These instructions are written in a programming language. We can think of a program as the implementation of an algorithm, which is a step-by-step plan for solving a problem. Languages like Python, Java, and VB.NET are high-level languages because they are closer to human language and abstract away complex computer operations. For designing and planning, we use pseudocode. Pseudocode is a structured, text-based description of an algorithm that is not tied to any specific programming language, making it a universal tool for developers.
Key term
Examiner insight
Common pitfall
Fun fact
Worked example 13 marks
Write a simple algorithm in pseudocode to ask for a user's name and then display a personalised greeting.
- 1
- Display a prompt to the user: OUTPUT "What is your name?"
- 2
- Read the user's input and store it: INPUT UserName
- 3
- Concatenate the greeting with the user's name and display it: OUTPUT "Hello, " + UserName
Recap
- Programming is the act of writing instructions for a computer.
- An algorithm is a logical, step-by-step procedure for solving a problem.
- High-level languages are human-readable and need to be translated for a computer to understand.
- Pseudocode is an essential tool for planning a program's logic before writing any code.
Quick check
- What is the relationship between an algorithm and a program?2 marks
- Why would a programmer use pseudocode before writing in Python or Java?1 mark