3.2 THE FUNCTIONING OF COMPUTERS WHAT IS A COMPUTER PROGRAM? A is a sequence of instructions written in a specific programming language that directs computer systems to perform a specific task. Programs are written by programmers on the basis of specific requirements and goals they want to . Computer programs consist of algorithms and databases . are the building blocks of programs and the set of steps to carry out a task. are organised collections of information and data stored in the computer system. A simple example of algorithm and database is a the algorithm is the set of instructions you have to follow to prepare the recipe, the database is the collection of ingredients you need. The programmer is the chef who writes the recipe in the language the computer can understand. computer program achieve 1 Algorithms Databases recipe: DO Can you give the definition of an algorithm? 1 How to write a program Writing a program is a complex operation that must follow a sequence of operations. The three basic points to start from are: strict : what is the function/operation that has to be carried out? Describe the mission : who will use the program? Define the end user : what kind of computer will run the program? Decide the machine Steps of program writing Writing a computer program : involves , i.e. the set of instructions written in a particular programming language; writing code , i.e. checking if it works according to the specifications; testing code , i.e. any programming mistake. debugging fixing Flowcharts When the task description is defined, the programmer prepares a , which is a diagram (or map) that shows step-by-step the entire process in a sequential order. The flowchart normally uses symbols to represent the different types of instructions and the the workflow must take to complete the task. After writing the flowchart, the program instructions are in a specific programming language, then tested and finally debugged. flowchart outline path encoded Symbols of flowcharts There are twenty-eight flowchart symbols that go from simple, basic operations to more complex ones. These are the five basic symbols: 2 DO Do you know any more flowchart symbols? 2