Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Іноземна за ПС 2 курс ФФМІ.doc
Скачиваний:
2
Добавлен:
16.11.2019
Размер:
273.92 Кб
Скачать

Практичне заняття № 6

Тема: Program design

Завдання 1. Complete the following definitions with the words and phrases in the list.

the various parts of the program

may occur in programs

language

binary numbers

a given problem

  1. algorithm. The step-by-step specification of how to reach the solution to……………………..

  2. flowchart. A diagram representing the logical sequence between…………………………..

  3. coding. The translation of the logical steps into a programming……………………………..

  4. machine code. The basic instructions understood by computers. The processor operates on codes which consist of

  5. debugging. The techniques of detecting, diagnosing and correcting errors (also known as ‘bugs’) which

Завдання 2. Read the text and find answers to these questions.

  1. Do computers understand human languages?

  2. What are the differences between low-level and high-level languages?

  3. What is an assembler?

  4. What is the function of compilers?

  5. What do you understand by the terms source program and object program?

  6. What do you infer from the text about the possibility of programming a computer in Spanish, French or Japanese?

Programming languages

Unfortunately, computers cannot understand ordinary spoken English or any other natural language. The only language they can understand directly is called machine code: central processors operate on codes which consist of a series of binary digits (Is and Os). In this form, the instructions are said to be in machine code.

However, machine code as a means of communication is very difficult to write. For this reason, we use symbolic languages that are easier to understand. Then, by using a special program, these languages can be translated into machine code. For example, the so-called assembly languages use abbreviations such as ADD, SUB. MPY to represent instructions. These mnemonic codes are like labels easily associated with the items to which they refer.

Basic languages, where the program is similar to the machine code version, are known as low- level languages. In these languages, each instruction is equivalent to a single machine code instruction, and the program is converted into machine code by a special program called an assembler. These languages are still quite complex and restricted to particular machines.

To make the programs easier to write and to overcome the problem of intercommunication between different types of machines, higher-level languages were designed such as BASK;, COBOL, FORTRAN or PASCAL. These languages are all problem-oriented rather than machine-oriented and can all be converted into the machine codes of different types of computers. Programs written in one of these languages (known as source programs) are converted info a lower-level language by means of a compiler (generating the object program). On compilation, each statement in a high-level language is generally translated into many machine code instructions.

People communicate instructipns to the computer in symbolic languages and the easier this communication can be made the wider the application of computers will be. Scientists are already working on Artificial Intelligence and the next generation of computers may be able to understand human languages.

Завдання 3. Look at the groups of words and decide what part of speech each word is. Then complete the sentences with the correct word.

compile, compiler, compilation

  1. Programs written in a high-level language require , or translation into machine code.

  2. A generates several low-level instructions for each source language statement.

  3. Programmers usually their programs to create an object program and diagnose possible errors.

program programmers programming programmable

  1. Most computer make a plan of the program before they write it. This plan is called a flowchart.

  2. A computer is a set of instructions that tells the computer what to do.

  3. C lonverting an algorithm into a. sequence of instructions in a programming language is called

bug debug debugger debugging

  1. New programs need to make them work properly.

  2. Any error or malfunction of a computer program is known as a ………………..

9 The best compilers usually include an integrated …….which detects syntax errors.

Завдання 4. Language work: Infinitive constructions

Make sentences as in the example.

Example: not easy / write instructions in PASCAL It is not easy to unite instructions in PASCAL.

  1. advisable / test the program under different conditions

  2. expensive / set up a data-processing area

  3. unusual for a program / work correcdy the first time it is tested

  4. difficult for students / learn FORTRAN

  5. important / consider the capabilities of the programming language

  6. quite easy / write instructions in BASIC