Lessons 19–20 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
19
About programs and programming
Textbook: pp. 47–48
GoalExplains the ideas of a computer program, programming and a programmer; gives examples of devices controlled by programs and describes the path of creating a program.
New words
computer program: an ordered set of instructions for the computer to carry out to solve a problem · kompyuter dasturiprogramming: the process of creating programs · dasturlashprogrammer: a person who writes programs · dasturchiinstruction (command): one action the computer is told to carry out · buyruq
Explanation
A computer program is an ordered set of instructions the computer must carry out to solve some problem. Creating programs is called programming, and the person who writes them is a programmer. Without programs a computer can do nothing: a text editor, a browser, a game, a music player – all are programs. Programs are not only in computers: a mobile phone, a washing machine, a car’s on-board computer and a lift also work by a program. For example, in a washing machine the program controls the water temperature and the washing time according to the chosen mode. The path of creating a program is like the one in the earlier topic: problem statement, model, algorithm, and then the algorithm is written in a programming language and tested. A program is written with strict rules the computer understands, so it is like learning a foreign language.
Worked examples
When you choose a name from the contact list on a mobile phone, the program finds the matching number and makes the call. This is the carrying out of program instructions: input (the name), processing (searching for the number), output (the call).
A simple calculator program: 1) two numbers are input; 2) an operation is chosen; 3) the result is calculated; 4) the result is shown on the screen. This is just an algorithm; written in a programming language it can be carried out by the computer.
Class activity
“Programmed things”: students list 5 things at home that work by a program (clock, microwave oven, traffic light…); the group names the input, processing and output of each.
Practice
1
What are a computer program, programming and a programmer?
A program is a set of instructions; programming is the process of creating it; a programmer is the person who writes it.
2
Name three devices that work with the help of a program.
For example: a mobile phone, a washing machine, a traffic light, a car’s on-board computer.
3
A traffic-light program: red – 30 s, yellow – 3 s, green – 27 s. How many seconds is one full cycle?
60
4
Why does a programmer design the algorithm first and only then program?
The algorithm shows the logic apart from language details; mistakes are found earlier and writing the program is easier.