The computer as a formal executor of algorithms. Master the concepts of algorithm, performer, have an idea of ​​the algorithm as a model of the performer’s activity - document Formal Performer

Home / Installing programs

Algorithm executors. Formal execution of the algorithm. Computer as a formal executor of algorithms (programs).

Lesson type: combined.

Lesson objectives:

Introduce the concept of “executor object”;

Introduce students to the third stage of algorithm development;

Introduce the concept of “Program”;

Introduce the rules for designing and calling a program;

Learn to solve problems involving programming with a linear algorithm.

Lesson objectives:

    Cognitive :

    Organize the work of students to study and initially consolidate knowledge bycollective and independent practical activities.

    Educational:

    Using an integrated approach, show students the meaning that the concept of “object-performer” has in nature, everyday life, technology and everyday life.

    To ensure that schoolchildren develop skills that contribute to the development of memory, logical thinking and the use of existing knowledge and skills when creating programs in a programming language.

    Educational:

    Formation of information culture, skills and abilities of collective and independent acquisition of knowledge;

    To cultivate a culture of speech when answering at the board, respect for all participants in the educational process.

Lesson progress

Organizational stage

Mutual greetings between teacher and students; recording of absentees; checking the external condition of the classroom; checking students' preparedness for the lesson; organization of attention and internal readiness.

Announcing the topic and objectives of the lesson. Repetition of material

Today in class we will continue to study the technology of solving problems using a computer. We have already become acquainted with the concept of an algorithm and its properties. And before we start studying new material, we’ll check your preparedness for the lesson.

Frontal survey:

    List the stages of solving a problem using a PC (statement of the problem, definition of conditions, construction of a model of the problem, description of the algorithm for solving the problem, selection of the optimal environment for the solution, description of the algorithm using selected software, testing the solution to the problem, if necessary, correcting the solution to the problem)

    List the main properties of the algorithm (discreteness, accuracy, understandability, mass availability, effectiveness)

    List the main forms of presentation of algorithms (verbal, graphical, software, tabular)

Explanation of new material:

Algorithms for solving various problems must be feasible in the environment where it is necessary to obtain the result. There must be an object in this environment that will execute the algorithm. Let's look at an example. Petya wanted tea. He boiled water in a kettle, put a tea bag in a cup, poured boiling water into it, added two teaspoons of sugar, stirred them with a spoon and drank his tea with pleasure. Let's draw up Petya's algorithm of actions in the form of a flowchart (the teacher calls the student to the board).

In this example, all the specified actions are performed by Petya, therefore he is the object that performs the algorithm. Petya knows how and can perform the actions specified in the algorithm. It performs these actions in the order specified. The object that executes the algorithm is calledperformer .

There are formal and informal performers. A formal performer performs the same command in the same way. An informal executor can carry out a command.

Formal performers are extremely diverse, but for each of them the following characteristics can be specified: the range of tasks to be solved (purpose), environment, command system and mode of operation.

Range of tasks to be solved. Each performer is created to solve a certain range of problems - constructing chains of symbols, performing calculations, constructing drawings on a plane, and so on.

Artist Environment – conditions under which the algorithm can be executed.

Executor Command System (SCS) – a list of actions that the performer is able to understand and perform.

The system of failures of performers is a list of failures that arise when it is impossible to execute the algorithm under specific conditions.

Performer operating modes – mode of direct and program control. Direct control - the performer waits for a command from a person and carries out each command immediately. Program control - the performer is given a sequence of commands (program), and then executes the commands automatically. Some performers work in only one of the modes.

The performers found in the tasks are “Grasshopper”, “Calculator”, “Pendulum”, “Turtle”, “Arrow”, “Dyer”, “Arrow”, “Turtle”, “Aquarius”, etc. etc.

Example: Performer The turtle moves on the computer screen, leaving a trace in the form of a line. The command system consists of the following commands:

Forwardn(Wheren– integer) – causes movement bynsteps in the direction of movement - in the direction where her head and body are facing.

Rightm(Wherem– integer) – causes a change in direction of movement bymdegrees clockwise.

Record RepeatK [<Команда1> <Команда2> … <Команда n>] – means that the sequence of commands in brackets will be repeatedkonce.

Think about what shape will appear on the screen after the Turtle performs the following algorithm:

Repeat 12[ Right 45 Forward 20 Right 45]

Answer:

Example: The computer's command system consists of two commands, which are assigned numbers:

1 – subtract 1

2 – multiply by 3

When writing an algorithm, for brevity, only command numbers are indicated. For example, algorithm 21212 means the following

Multiply by 3

Subtract 1

Multiply by 3

Subtract 1

Multiply by 3

Using this algorithm, the number 1 is converted to 15: ((1*3-1)*3-1)*3=15

Example: Performer Robot operates on a checkered field, between adjacent cells of which there may be walls. The robot moves along the cells of the field and can perform the following commands: up, down, right, left.

When performing each such command, the Robot moves to an adjacent cell in the indicated direction. If there is a wall in this direction between the cells, then the Robot is destroyed.

What will happen to the Robot if it executes a sequence of commands: right, down, right, down, right. Having started moving from cell A. What sequence of commands does the Robot need to execute in order to move from cell A to cell B without being destroyed by encountering the walls?

An algorithm presented in a language understandable to the Executor is calledprogram .

Program – an ordered sequence of commands (instructions) necessary for a computer to solve a given task.

The main difficulty in developing computer programs lies in creating or finding an algorithm. Compiling a program using a known algorithm is called coding.

Programming (coding) is the process of creating a program for a computer.

Each algorithm presented as a program must have a unique name that does not coincide with words built into the language. A program has a header that indicates its name. New algorithm is saved in the computer's memory under its own name, and can be called (executed) by entering the name of this program. Programs have the same properties as algorithms.

Lesson summary:

Dialogue:

    What new did you learn in the lesson?

    What is the practical significance of the issue being studied?

    What are the positive aspects of the lesson?

    Wishes

Thanks for your work in class!

There are two types of performers: formal and informal.

A formal performer always performs the same command in the same way.

An informal executor can carry out a command in different ways.

For example, when you repeatedly listen to a disc with your favorite melody, you can be sure that it is reproduced by the player (formal performer) in the same way. But it is unlikely that any of the singers (informal performers) will be able to perform a song from their repertoire in exactly the same way several times.

As a rule, a person acts as an informal performer.

Formal performers are predominantly technical devices.

A person in the role of an informal performer is responsible for his own actions.

The object that controls him is responsible for the actions of the formal executor.

Let us consider in more detail the set of formal performers. Formal performers are extremely diverse, but for each of them it is possible to specify the range of tasks to be solved, the environment, the command system, the failure system and operating modes.

  1. Range of tasks to be solved. Each executor is created to solve a specific class of problems.
  2. Artist Environment. The area, setting, and conditions in which the performer operates are usually called the environment of the given performer.
  3. Executor command system. An instruction to perform a separate completed action of the performer is called a command. The set of all commands that can be executed by some executor forms the SKI - the system of executor commands.
  4. Performer failure system. The “I don’t understand” refusal occurs when the performer is given a command that is not part of his SKI. The “I can’t” refusal occurs when a command from the SCI cannot be executed by it under specific environmental conditions.
  5. Performer operating modes. For most performers, direct and program control modes are provided. In the first case, the performer waits for commands from a person and immediately executes each received command. In the second case, the performer is first given a complete sequence of commands (program), and then he executes all these commands automatically. A number of performers work only in one of the named modes.

Algorithm development - a labor-intensive task that requires a person to have deep knowledge and a lot of time. Solving a problem using a ready-made algorithm only requires the performer to strictly follow the given instructions. The performer does not delve into the meaning of what he is doing and does not reason why he acts this way and not otherwise - he acts formally. Related to this is the possibility of automating human activities:

  • the process of solving a problem is presented as a sequence of simple operations;
  • a machine is created ( automatic device), capable of performing these operations in the sequence specified in the algorithm;
  • a person is freed from routine activities, the execution of the algorithm is entrusted to an automatic device.

There are two types of performers: formal and informal.

A formal performer always performs the same command in the same way.

An informal executor can carry out a command in different ways.

For example, when you repeatedly listen to a disc with your favorite melody, you can be sure that it is reproduced by the player (formal performer) in the same way. But it is unlikely that any of the singers (informal performers) will be able to perform a song from their repertoire in exactly the same way several times.

As a rule, a person acts as an informal performer.

The formal performers are predominantly technical devices.

A person in the role of an informal performer is responsible for his own actions.

The object that controls him is responsible for the actions of the formal executor.

Let us consider in more detail the set of formal performers. Formal performers are extremely diverse, but for each of them it is possible to specify the range of tasks to be solved, the environment, the command system, the failure system and operating modes.

  1. Range of tasks to be solved. Each executor is created to solve a specific class of problems.
  2. Artist Environment. The area, setting, and conditions in which the performer operates are usually called the environment of the given performer.
  3. Executor command system. An instruction to perform a separate completed action of the performer is called a command. The set of all commands that can be executed by some executor forms the SKI - the system of executor commands.
  4. Performer failure system. The “I don’t understand” refusal occurs when the performer is given a command that is not part of his SKI. The “I can’t” refusal occurs when a command from the SCI cannot be executed by it under specific environmental conditions.
  5. Performer operating modes. For most performers, direct and program control modes are provided. In the first case, the performer waits for commands from a person and immediately executes each received command. In the second case, the performer is first given a complete sequence of commands (program), and then he executes all these commands automatically. A number of performers work only in one of the named modes.

Algorithm development - a labor-intensive task that requires a person to have deep knowledge and a lot of time. Solving a problem using a ready-made algorithm only requires the performer to strictly follow the given instructions. The performer does not delve into the meaning of what he is doing and does not reason why he acts this way and not otherwise - he acts formally. Related to this is the possibility of automating human activities:

  • the process of solving a problem is presented as a sequence of simple operations;
  • a machine (automatic device) is created that is capable of performing these operations in the sequence specified in the algorithm;
  • a person is freed from routine activities, the execution of the algorithm is entrusted to an automatic device.

| Lesson planning and lesson materials | 6th grade | Planning lessons for the academic year (FSES) | Performers around us

Lesson 24
Performers around us
Working in the environment of the Grasshopper performer

Formal performers

Formal performers

There are two types of performers: formal and informal. A formal performer always performs the same command in the same way. An informal executor can carry out a command in different ways.

For example, when you repeatedly listen to a disc with your favorite music, you can be sure that it is reproduced by the player (formal performer) in the same way. But it is unlikely that any of the singers (informal performers) will be able to perform a song from their repertoire in exactly the same way several times.

As a rule, a person acts as an informal performer. The formal performers are predominantly technical devices. A person in the role of an informal performer is responsible for his own actions. The object that controls him is responsible for the actions of the formal executor.

Let us consider in more detail the set of formal performers. Formal performers are extremely diverse, but for each of them it is possible to specify the range of tasks to be solved, the environment, the command system, the failure system and operating modes.
1. Range of tasks to be solved. Each executor is created to solve a specific class of problems.
2. Artist Environment. The area, setting, and conditions in which the performer operates are usually called the environment of the given performer.
3. Executor command system. An instruction to perform a separate completed action of the performer is called a command. The set of all commands that can be executed by some executor forms the SKI - the system of executor commands.
4. Performer failure system. The “I don’t understand” refusal occurs when the performer is given a command that is not part of his SKI. The “I can’t” refusal occurs when a command from the SCI cannot be executed by it under specific environmental conditions. 
5. Performer operating modes. For most performers, direct and program control modes are provided. In the first case, the executor waits for commands from the control object and immediately executes each received command. In the second case, the performer is first given a complete sequence of commands (program), and then he executes all these commands automatically. A number of performers work only in one of the named modes.

© 2024 ermake.ru -- About PC repair - Information portal