SlideShare una empresa de Scribd logo
1 de 31
Способы записи
  алгоритмов
 Исполнитель Чертежник
Система программирования
      Pascal ABC



      Строка      Панель             Строка
       меню    инструментов         заголовка




  Строка
 состояния
                                Окно
                              редактора
Исполнитель Чертежник
предназначен для построения рисунков
и чертежей с помощью инструмента
«перо», которое исполнитель может
поднимать, опускать, перемещать.

При перемещении опущенного пера на
ним остается след.
Среда
обитания
- координатная
  плоскость.
Среда
обитания
Начальное и
конечное
состояние
исполнителя
Чертежник:

Перо поднято
и находится
над точкой
(0,0)
Среда
обитания
- координатная
  плоскость.




  А(3,4)
  В(1,2)
Система команд
Field (n,m); создать поле исполнителя
             Чертежник (n клеток по
             горизонтали, m клеток по
             вертикали)
PenUp;       поднять перо исполнителя
             Чертежник
PenDown; опустить перо исполнителя
             Чертежник
ToPoint(x,y);переместить перо исполнителя
             Чертежник в точку (x,y)
Система команд
Field (n,m);

создать поле
исполнителя
Чертежник (n
клеток по
горизонтали, m
клеток по
вертикали)
Система команд
ToPoint(x,y);


переместить перо
исполнителя
Чертежник в точку
(x,y)
Вызов исполнителя Чертежник

  Uses Drawman;



 использовать
Шаблон программы

Program имя программы;
Uses Drawman;
Begin
  Field(...,...);
  . . .
End.        Конец программы

 Начало программы
Шаблон программы

Program имя программы;
Uses Drawman;
Begin



                         !
  Field(...,...);
  . . .
End.
Шаблон программы

Program имя программы;
Uses Drawman;
Begin
  Field(...,...);
  . . .
End.

 Любая последовательность латинских букв и
        цифр, начинающаяся с буквы
Шаблон программы

Program имя программы;
Uses Drawman;
Begin
  Field(...,...);
  . . .
End.             Команды
                 исполнителя
                  Чертежник
Пример

Program ASD;
Uses Drawman;
Begin
  Field(7,9);
End.
Выполнение (F9 или   )
Выполнение (F9 или   )
Задание 1
  Загрузить текст программы из файла
Shablon.pas, заменить в тексте многоточия
нужными числами для получения рисунка.
Сохранить текст программы под именем AA.pas
Задание 2
    Изменить текст
    программы AA.pas
    таким образом, чтобы
    получился такой
    рисунок, и сохранить
    текст под именем
    BB.pas
1)   создать поле
     размером 3х4;
2)   переместить перо                      (2,3)
     в точку (1,2);
3)   опустить перо;                        2
4)   переместить перо
     в точку (2,3);                 1, 4
5)   переместить перо       (1,2)

     в точку (2,1);                        3
6)   переместить перо
                                               (2,1)
     в точку (1,2);
7)   поднять перо;
8)   переместить перо   5
     в точку (0,0).
Program TR;
                              uses Drawman;
                             Begin
1)   создать поле размером    Field(3,4);
     3х4;
2)   переместить перо в       ToPoint(1,2);
     точку (1,2);
3)   опустить перо;           PenDown;
4)   переместить перо в       ToPoint(2,3);
     точку (2,3);
5)   переместить перо в       ToPoint(2,1);
     точку (2,1);
6)   переместить перо в       ToPoint(1,2);
     точку (1,2);
7)   поднять перо;            PenUp;
8)   переместить перо в       ToPoint(0,0);
     точку (0,0).            End.
Пример
Написать
программу
для
получения
рисунка:
Алгоритм получения
          изображения
1) определить узловые точки рисунка;
2) определить порядок их обхода;
3) определить координаты узловых точек;
4) записать нужные действия;
5) записать соответствующие команды
  для исполнителя Чертежник;
6) ввести текст программы в компьютер;
7) выполнить программу.
(3,5)      7




                                          8       (4,3)

     (1,2)                 (3,2)
                                                          (5,2)
             2                     6, 9              3

                    1, 5                      4
                 (2,1)                            (3,1)

10
1) создать поле размером 4х5;
2) переместить перо в точку (1,1);
3) опустить перо;
4) переместить перо в точку (0,2);            (3,5)
                                                  7
5) переместить перо в точку (4,2);
6) переместить перо в точку (3,1);
7) переместить перо в точку (1,1);                    8 (4,3)
8) поднять перо;                      (1,2)    (3,2)         (5,2)
9) переместить перо в точку (2,2);        2      6, 9    3
10)опустить перо;                           1, 5      4
                                          (2,1)         (3,1)
11)переместить перо в точку (2,5);   10
12)переместить перо в точку (3,3);
13)переместить перо в точку (2,2);
14)поднять перо;
15)переместить перо в точку (0,0).
Закрепление материала
Что нарисует Чертежник, выполнив программу:

Program _1;
Uses Drawman;
Begin
Field(8,5); ToPoint(1,1); PenDown;
ToPoint(1,3); ToPoint(3,3);
ToPoint(4,2); ToPoint(5,3);
ToPoint(7,3); ToPoint(7,1);
ToPoint(1,1); PenUp; ToPoint(0,0);
End.
Закрепление материала
Исправь ошибки в программе:
Program _2;
Uses Drawman;
Begin
ToPoint(3,3); PenDown;
ToPoint(1,1);
ToPoint(3,1)
ToPoint(1,1); PenUp;
ToPoint(0,0);
End.
Решение:

Program _2;
Uses Drawman;
Begin
Field(4,4);
ToPoint(2,3); PenDown;
ToPoint(1,1);
ToPoint(3,1);
ToPoint(2,3); PenUp;
ToPoint(0,0);
End.
Подведение итогов
   Рефлексия

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Чертежник