Back forward

Attention! Preview slides are for informational purposes only and may not represent the full extent of the presentation. If you are interested this work please download the full version.

Lesson goals.

Educational - systematization of knowledge, skills and abilities of work on the topic “Algorithms and executors”; developing the skills of drawing up algorithms and presenting them in the form of flowcharts.

Educational - increasing the motivation of students, the formation of skills of self-organization, independence and initiative.

Developing - the development of figurative, logical thinking of students; ability to analyze and synthesize knowledge; formation of information culture among students.

Equipment: computer, projector, screen, presentation.

DURING THE CLASSES

I. Organizational moment (slides 1, 2).

II. Actualization of basic knowledge (slides 3, 4, 5). What is an algorithm?

  • List the properties of the algorithm.
  • Name the types of algorithms.
  • What is a linear algorithm.
  • What is a branching algorithm?
  • What is a round robin algorithm?
  • What types cyclic algorithm you know?
  • Name the ways of representing the algorithm.
  • Which of the following figures are used in flowcharts?
  • 10. Based on these flowcharts, name the type of algorithm.

    linear

    loop with precondition

    branching ( long form)

    loop with postcondition

    branching (incomplete form)

    loop with parameter

    III. Problem solving

    Teacher: Now we move on to problem solving. Today we will build block diagrams with you.

    Task 1. Determine the distance traveled by a person, if the time is known, the speed of movement, and the movement was uniform. (Slide 6)

  • Guys, what do we know from the condition of the problem? ( Speed, time, movement was uniform, so the distance is calculated by the formula S=v*t)
  • What should we do before building a block diagram? (Create an algorithm)
  • Let's verbally compose verbal algorithm.
  • Algorithm

    1. Input v, t.

    2. Calculate s.

    3. Conclusion s.

    • Tell us, what algorithm did we get with you? ( Linear algorithm)
    • Now let's move on to building a block diagram. What elements of the flowchart do we need? ( Start, end, data input, distance calculation, result output) on the screen all elements.
    • Guys, put all the elements in the right order. ( On screen result)

    Calculate (slide 7).

    • Where do we start? (Composing a verbal algorithm)
    • What do you need to pay attention to in this problem? (We calculate the value of the fraction, the denominator is the difference 7-y, which, depending on the value of y, can be equal to zero, in this case there will be no solution)

    Algorithm

    1. Enter a, y.

    2. If 7-y=0, then there is no solution.

    4. Conclusion s.

    • Tell us, what algorithm did we get with you? (Branching algorithm, full form)
    • Guys, look at each item of the algorithm and say which elements of the flowchart correspond to them. (Screen figures separately)
    • What flowchart elements are we missing? ( start, end)
    • Guys, you help me build a flowchart by naming the elements in order. (Items appear on the screen in turn.)

    Task 3. Build a block diagram of the signature algorithm for 10 New Year's cards. (Slide 8)

    Students write down a verbal algorithm in a notebook, check it (the answer is on the screen), then build a flowchart, check it (the answer is on the screen).

    IV. Summing up the lesson

    V. Homework

    For task 3, draw up flowcharts using a loop with precondition and postcondition.

    block diagram we will call such a graphical representation of the algorithm, when individual actions (or commands) are presented in the form of geometric shapes - blocks. Inside the blocks, information about the actions to be performed is indicated. The connection between the blocks is depicted using lines called communication lines, denoting the transfer of control.

    There is a State Standard that defines the rules for creating flowcharts. The configuration of blocks, as well as the order of graphic design of block diagrams, are regulated by GOST 19.701-90 "Schemes of algorithms and programs". In table. 2.1 shows the designations of some elements, which will be quite enough to depict algorithms when performing student work.

    Rules for drawing up flowcharts:

      Each block diagram must have a block " Start" and one block " End».

      « Start» must be connected to the block « End» flow lines for each of the branches on the block diagram.

      There should be no blocks in the block diagram, except for the block " End”, from which the flow line does not exit, as well as blocks from which control is transferred “to nowhere”.

      Blocks must be numbered. Numbering blocks are placed from top to bottom and from left to right, the block number is placed at the top left, in the break of its outline.

      Blocks are interconnected by flow lines that determine the sequence of block execution. The flow lines should run parallel to the sheet borders. If the lines gofrom right to left orupwards , then the arrows at the end of the line are required, otherwise they can be omitted.

      With respect to blocks, lines can be incoming and coming out. The same flow line is output for one block and input for another.

      From the block Start» Unlike all other blocks, the flow line only exits, since this block is the first in the block diagram.

      Block " End' has only an input, as it is the last block in the block diagram.

      For ease of reading, it is desirable that the flow line enters the Process block from the top and exits from the bottom.

      In order not to clutter up the block diagram with complex intersecting lines, flow lines can be broken. At the same time, at the place of the gap, connectors, inside which the numbers of connected blocks are indicated. There should be no breaks in the block diagram that are not labeled with connectors.

      In order not to clutter up the block, you can provide information about data, variable designations, etc. place in comments to the block.

    Block name

    Block designation

    Block assignment

    Terminator

    Start/End of program or subprogram

    Data processing (computational action or sequence of computational actions)

    Branching, selection, condition checking. The block specifies a condition or a question that determines the further direction of the algorithm execution.

    Training

    Counting Cycle Header

    predefined process

    Referring to a procedure

    Data input/output


    Types of Algorithms

    The type of algorithm is determined by the nature of the task being solved in accordance with its commands. There are three types of algorithms: linear, branching, cyclic.

    Linear algorithm consists of an ordered sequence of actions that does not depend on the values ​​of the initial data, while each command is executed only once strictly after the command that precedes it.

    Such, for example, is the calculation algorithm for the simplest non-alternative formulas, which has no restrictions on the values ​​of the variables included in these formulas. As a rule, linear processes are an integral part of a more complex algorithm.

    branching Algorithms are called in which, depending on the value of some expression or on the fulfillment of some logical condition further actions can be produced in one of several directions.

    Each of the possible directions for further action called branch.

    In block diagrams, branching is implemented by a special block " Solution". This block provides the possibility of two outputs. In the "Decision" block itself, a logical condition is recorded, on the fulfillment of which further actions depend.

    There are several types of branching algorithms.

    1. "Bypass" - such a branch when one of the branches does not contain any operator, i.e. sort of bypasses several actions of another branch.

    2. "Branching" - this type of branching, when each of the branches contains a certain set of actions.

    3. "Multiple Choice" - a special type of branching, when each of several branches contains a certain set of actions. The choice of direction depends on the value of some expression.

    Cyclic Algorithms are used in cases where it is required to implement repeatedly repeated calculations of the same type. Cycle is a sequence of actions that can be performed repeatedly, i.e. more than once.

    Distinguish:

        loops with a known number of repetitions (or with a counter);

        cycles with an unknown number of repetitions (cycles with precondition and cycles with postcondition).

    In any loop, there must be a variable that controls the exit from the loop, i.e. determines the number of iterations of the loop.

    The sequence of actions that must be performed on each cycle step(i.e. at each repetition of the loop), is called loop body or working part of the cycle.

    Strictly speaking, the term "block diagram" does not exist. Instead of this phrase, it is correct to say “algorithm scheme”, but this is not about that now. My article is about whether it is possible to quickly and conveniently draw algorithms, while also making it free. It would be great if there was free analogue Gliffy online editor, and fortunately we have it.

    Algorithms in Pencil are very easy to draw. To do this, there is a dedicated library of primitives with building blocks and connectors. It looks something like this:

    When drawing blocks, they are automatically snapped to the grid, making it easy to align them. Having drawn one block, another block can be “magnetized” to it from below or from the side, everything will be smooth.

    If you hover over the block and click the mouse once, there will be a block resizing and dragging mode. If you click a second time, the block can be rotated (circular red dots will appear around the edges).

    Basic basic capabilities, almost like in Visio: blocks can be combined into groups, dragged and copied, placed above or below in layers, magnetic connectors to the center, etc.

    There are also disadvantages, for example, the corner connector does not work very correctly: it sometimes transforms into an unimaginable zigzag when you try to select and drag it. But these shortcomings are so insignificant that they did not prevent the Pencil program from taking its rightful place in my collection of everyday developer tools.

    In life, we often have to meet with different situations in which we perform the same certain actions. In order to wake up on time, we need to remember to turn on the alarm clock. In order to satisfy our hunger, we need to follow the same steps to prepare delicious food. In order to do the work we know, we also often do the same thing.

    This behavior can be called differently, depending on the context in which it is considered. If we consider from the position of performance efficiency, then these actions can be called habits or skills. If we consider from the point of view of the process mapping, then the description of the sequence of actions, the strict execution of which leads to the solution of the tasks in a certain number of steps, is called the algorithm of actions.

    How are action algorithms created?

    We encounter this all the time in everyday life. What actions do we take to replenish our account mobile phone? Each of us is different. Since there are several ways to replenish an account, therefore, we all do it differently. The result, though always the same, is the appearance of funds on the phone.

    Or another example: to copy an image or text, press right click click on the picture, then select "Copy", place in Right place, right-click "Paste", and the result is achieved.

    All this is a certain sequence of actions, as a result of which the task is solved by various means. But for now, this is only our knowledge, which develops into skills and abilities, and if this process is described, then we can clearly see the algorithm of our actions and pass it on to other people. In words, not everything is always clear.

    Describe the sequence of actions - it is remembered

    Create action algorithm possible by describing or depicting its sequence. Does everyone know what needs to be done to plant a tree? Perhaps the basic steps are clear to everyone, but not everyone remembers when to water the tree, before planting or after. The created algorithm will allow all actions to be performed in the correct sequence.

    To describe the sequence of actions more complicated, you will have to try and write them all down in detail. An example can be taken from all sorts of rules and instructions - the actions that we need to do are very clearly prescribed in steps. But there are situations in which a certain action is followed by not one step, but several, depending on the previous result. In this case, the alleged actions are also recorded so that the person can easily navigate in different situations and know what needs to be done.

    The algorithm of actions in the chart is a flowchart

    If we depict the algorithms of actions in a graphical version, using geometric shapes with connection lines showing the order in which the action is performed, then we will get a flowchart. The flowchart is far superior to the rules, instructions, and algorithms of actions written in order, in its visibility and readability.

    Imagine that you need to teach another person something. You know very well all the actions in a certain sequence. Your task is to show how it should be done and pass on your knowledge so that the other person remembers and knows it just like you do. Oral transmission of knowledge allows improvisation and some arbitrariness. by the most the best way there will be a flowchart that explains the sequence and possible options actions. As an example, here is a fun guide to learning blogging charts:

    The best condition for obtaining the result will be the repetition of actions. This clearly affects the speed of achieving results in the future. The more often you have to repeat the same actions, the faster you will learn to perform a sequence of actions, which means that each subsequent time you will need less time to complete.

    Flowcharts are used in sales

    In sales, such training through the development of algorithms and their presentation in the form of flowcharts is very common. Most often they are used in telephone conversation scenarios in call centers and for cold calls. Corporate culture is gaining momentum, so many companies no longer allow employees to carry a "gag", even a talented one, but offer them to act according to a pre-developed scenario, representing the "face of the company" at various stages. The effect appears literally after several days of actions "on a piece of paper". Over time, many of the described algorithms are remembered by the employee, and in the future he can freely communicate without fear of which direction the conversation might go.

    Action algorithms and blog schemes are developed not only in sales. They are widely used in the training and practice of doctors, programmers, computer scientists, and in many technical specialties.

    It is worth trying to learn how to act according to such flowcharts. After all, when meeting with an initially incomprehensible abundance of actions and tasks for the first time, you think about how you miss the developed flowchart. After a long torment, you can’t stand it, and you begin to develop and create on your own. Effective People do not like downtime. And flowcharts greatly simplify life and allow you to understand the solution of complex problems.

    Services for developing flowcharts

    There are services on the Internet that can help you create such flowcharts. One of them is Cacoo. With it, you can easily turn your algorithms into various diagrams, flowcharts and graphs. You will see that it is a very pleasant and joyful activity to transform what you know into science for other people.

    - you are in a good mood. At the initial stage, you can take advantage of the free account, and in the future you will need to pay for access. It is natural that free access has limitations compared to paid ones. But for the study and the first steps, the functionality is quite enough.

    Having developed action algorithms and converted them into block diagrams With the help of Cacoo, you can create a good mood for a long time not only for yourself, but also for other people who are learning the basics.

    Create play flowcharts for your kids

    Summing up the above, I note that now you can use action algorithms and flowcharts in various life situations. Even your children with great pleasure will begin to perform not the most interesting duties, following clear prompts. If there are ideas where and how to apply action algorithm, share in the comments, dear readers. I would like to know about your algorithms.

    My block diagram

    Here is the flowchart I came up with for the first time. To enlarge an image, click on it. After switching to Cacoo, under the “view figure” entry, click on the picture. It will open in a large window. Good luck!