Programming for prospective educators (using Scratch) und ITBO-Programming-part-4: Unterschied zwischen den Seiten

Aus ZUM-Unterrichten
(Unterschied zwischen Seiten)
Markierung: 2017-Quelltext-Bearbeitung
 
Markierung: 2017-Quelltext-Bearbeitung
 
Zeile 1: Zeile 1:
| [[ITBO-Programming-part-1| unit 1 →]] | [[ITBO-Programming-part-2| unit 2 →]] | [[ITBO-Programming-part-3| unit 3 →]] | [[ITBO-Programming-part-4| unit 4 →]] |
{{DISPLAYTITLE:Programming for prospective educators (using Scratch) - unit 4}}


<br />
| [[Programming_for_prospective_educators_(using_Scratch)| ⇠ back to main page]] |  [[ITBO-Programming-part-1| ⇠ unit 1]] | [[ITBO-Programming-part-2| ⇠ unit 2]] | [[ITBO-Programming-part-3| ⇠ unit 3]] | '''unit 4''' |
 
[[Programmieren für angehende Pädagog:innen (mit Hilfe von Scratch)| Deutschsprachige Originalversion: Programmieren für angehende Pädagog:innen (mit Hilfe von Scratch) →]]
 
<br />
 
=='''Introduction'''==
 
This course has been developed for students of Swiss specialised upper secondary schools in the occupational field of education (=pedagogy), subsequently abbreviated as «SSC-P».
 
The course comprises four units of 2 lessons each. For each unit, instructions are available for the students and a handout for the teacher. In addition, the templates and sample solutions for the programming tasks are published in studio [https://scratch.mit.edu/studios/33643766/|Studio ITBO Programming] on the Scratch portal.
 
=='''unit 1'''==
 
In '''unit 1''', the students will get to know the programming environment of Scratch and the basics of programming by means of a sample project. They will implement a matchstick puzzle (model construction). Without too many theoretical considerations, the students will learn basic concepts of "professional" programming (object and event orientation, process communication). Additionally, the students will get acquainted with a Scratch-extension (text-to-speech).


{{Box|Objectives unit 1|* The students get to know the Scratch programming environment and how to use it in order to create and manage their own programming projects.


* They learn the basic elements of the Scratch programming language and use them to "write" their first simple programs.


* The students reflect on their experiences with programming.
=='''Guidance for students (Open Document Format ODF)'''== {{Box|Download|[[Datei:ProgrammierenTeil4StudentEditionV4.odt|mini]]|Download }}


* They also learn (without too many theoretical considerations) basic concepts of "professional" programming (object and event orientation, process communication).|Kurzinfo }}
=='''Handout for teachers'''==


[[ITBO-Programming-part-1|jump to unit 1]] [[Datei:Icon_Noun-internal-link-4974682.svg|verweis=ITBO-Programming-part-1|30x30px]]
{{Box|Download|[[Datei:ProgrammierenTeil4TeacherEditionV4.odt|mini]]|Download }}


{{Box|Objectives|* The students shall understand a simulation as a way of searching a solution for a problem.


=='''unit 2'''==
* They will analyse and test the provided example of the simulation of a robotic lawnmower.


'''Unit 2''' focuses on the concept of turtle graphics and the use of Scratch in primary school. Using the example of "properties of regular polygons", the students can experience exploratory learning with turtle graphics for themselves. In addition, the students learn about and apply the essential "basic building blocks" of programs (sequence, repetition, conditional execution, variables).  
* The students supplement the simulation example with an algorithm that they will develop on their own.


{{Box|Objectives unit 2|* The students get more familiar with Scratch.
* They shall understand the block concept as a means to clearly outline programs.|Kurzinfo }}


* They learn about and apply the "basic building blocks" of programs (sequence, repetition, conditional execution, variables).


* The students understand the concept of turtle graphics for the exploratory learning in primary school.
==='''Introduction'''===


* They deal with the programming of turtle graphics by means of a concrete example.|Kurzinfo }}
:A computer simulation is a program that models a system (e.g. the streets in a neighbourhood with high traffic volumes) and shows (often with a visualisation) how the simulated system behaves under different conditions (e.g. if speed limit 30 was introduced, or if some streets were converted to one-way streets). Computer simulations are useful, for example, when experiments with the real system of interest are too costly, too dangerous or even impossible. And even when experiments are possible, comparison with simulations often helps to better understand the behaviour of the individual components of a system.


[[ITBO-Programming-part-2|jump to unit 2]] [[Datei:Icon_Noun-internal-link-4974682.svg|verweis=ITBO-Programming-part-2|30x30px]]
:In this unit, the students analyse the example of a simulation program for a lawn mowing robot. They supplement the program with a self-developed algorithm that causes the robotic lawnmower to "return" to its box at the end of the simulation. The students learn about and apply the concept of structuring programs with blocks.


:The lesson might be started with an advance organiser: Who knows of robotic lawnmowers or hoovers from experience (at home, from neighbours, etc.)? Do these robots mow or hoover the lawn or room completely, right down to the last corner around all obstacles? Can this be proven, estimated or verified? What do you think about a simulation?
   
   


=='''unit 3'''==
==='''Getting familiar with the example program'''===


'''Unit 3''' introduces the students to the design and programming of multimedia stories / animations in Scratch.
<br />


{{Box|Objectives unit 3|* The students analyse a simple interactive, multimedia "story". They complete the "story" with an additional scene.
[[Datei:BildschirmaufnahmeMähroboterSimulation.png|zentriert|mini]]


* The students learn how to design and create "scenes" and "scene changes".


* They learn how to design and implement animations.|Kurzinfo }}
:For this unit, the students need the program (project) "RobotLawnMowerSimulation-Template". It is published on the Scratch platform and can be downloaded from there to one´s own computer: https://scratch.mit.edu/projects/878189075/


[[ITBO-Programming-part-3|jump to unit 3]] [[Datei:Icon_Noun-internal-link-4974682.svg|verweis=ITBO-Programming-part-3|30x30px]]
:The program simulates a robotic lawnmower on a plot of land with shrubs. When the lawnmower touches an obstacle (a shrub, the edge of the plot), it backs up a bit and then rotates through a random angle between 15 and 30 degrees. Then the lawnmower continues straight ahead until it touches another obstacle.


=='''unit 4'''==
:The students should start the program several times and take a screenshot of the simulation result. When the students compare the paths of the lawnmower, they should realise that the results differ and understand why this is so.


In '''unit 4''', the students deal with the simulation of a robotic lawnmower. They rely on the block concept, which makes their work much easier and provides a clearer outline of the program. Using this example, the students reflect on the problem of the determinacy and correctness of programmed solutions to problems.
:Although the simulation always ends after the same number of steps (the algorithm is ''terminating''), the result of the program is always different. The result of the program execution is ''non-determined'': In each simulation, the paths are different and the robotic lawnmower ends up in a different place.


{{Box|Objectives unit 4|* The students understand a simulation as a way of searching a solution for a problem.
:But is the algorithm at least ''robust'', i.e. does it still work reliably when the execution conditions change?


* They analyse and test the provided example of the simulation of a robotic lawnmower.
:The students must understand what an algorithm is. They need to take note of the terms terminating, non-determined and robust. Thus they should become aware of the fact that an algorithm does not necessarily always give exactly the same solution when one runs it several times.


* The students supplement the simulation example with an algorithm that they develop on their own.
:The students should modify the program in order to assess the results of the simulation under different conditions. For this purpose, they place an additional obstacle (house) on the "plot of land" .


* They understand the block concept as a means to outline programs clearly.|Kurzinfo }}
:The students must adjust the relevant execution condition in the block "Mowing" so that the robotic lawnmower recognises the house as an obstacle.


[[ITBO-Programming-part-4|jump to unit 4]] [[Datei:Icon_Noun-internal-link-4974682.svg|verweis=ITBO-Programming-part-4|30x30px]]
[[Datei:CodeSequenzHindernisErkennen.png|zentriert|mini]]


:Perhaps the students need support in this step. They should make sure that the robotic lawnmower doesn't "mow through the house".


External devices or systems (e.g. LEGO Mindstorm) were not taken into account. Such devices and systems are a matter of a robotics course.
==='''The block concept for the structuring of programs'''===
 
"Data structures" are not sufficiently covered in this programming course. This is a shortcoming inherent in many instructions on how to learn programming. However, the given time budget of 8 lessons does not allow the topic of "data structures" to be dealt with adequately. It would make sense to discuss "data structures" in the context of social media. The students would then be able to recognise the importance and functioning of modern, networked data structures (linked data) and understand why companies are so interested in social media.
 
=='''Teaching process'''==
 
The students will bring different levels of prior knowledge to the course and show different levels of interest in programming. Some students will declare that they already know how to program. Others will be sceptical about whether they will ever learn it and whether they need it at all.
 
If the high expectations of programming in school (... logical and critical thinking, creativity, teamwork, ...) are to be fulfilled, the students must deal with the contents of the programming course in their own way.
 
There are instructions for each unit (student editions), with which the students can work independently in groups (ideally in pairs, if necessary in groups of three). This gives the teacher time to deal more intensively with the students who already have experience or are sceptical about programming. For this purpose, teachers have an accompanying document for each unit (teacher edition). Supporting the sceptical students in such a way that they experience their reservations as an encouragement, and motivating the experienced students to (self-)critically examine the contents of selected units would be desirable goals.
 
A formative evaluation of the learning outcomes does not make sense in this context. Conversely, a collaborative text editor (e.g. https://edupad.ch) would enable the students to continuously note down and discuss their questions / comments and reflections on the tasks . If necessary, the teacher might require all students to contribute at least three relevant questions and/or comments.
 
=='''Time requirement'''==
 
The time required for the four units is 2 lessons for each. Units 1 and 2 form a single lesson; depending on the class, they may take a little more time to complete. In that case, unit 4 might have to be omitted.
 
=='''Material and sample solutions'''==  
 
The documents for the programming course (teacher editions, student editions) are freely accessible on the ZUM-Server (Zentrale für Unterrichtsmedien): [Programming for prospective educators (using Scratch)|https://unterrichten.zum.de/wiki/Programming_for_prospective_educators_(using_Scratch)].


The templates and sample solutions to the tasks are published as projects on the Scratch platform in the studio "ITBO Programming" [https://scratch.mit.edu/studios/33643766/].
:The script of the simulation program is very simple.
 
=='''Disposition'''==
 
 
{{Box|Download|[[Datei:ProgrammingCourseDispositionV1.odt|ProgrammingCourseDispositionV1.odt|mini]]|Download }}
 
<br/>
 
==='''Warum programmieren?'''===
 
Programmieren ist eine Tätigkeit, deren Ergebnis ein Computer-Programm ist. Das Faszinierende daran ist die Vielfalt an unterschiedlichen Aufgaben, die mit solchen Programmen gelöst werden können.
 
Warum sollen die angehenden ''Lehrpersonen'' programmieren lernen? Es gibt zahlreiche Quellen, die Antworten auf diese Frage liefern, zum Beispiel:
 
{{Box|Zitat|Programmieren [ist] so wichtig wie schreiben und lesen. Quelle: https://www.fritzundfraenzi.ch/gesellschaft/programmieren-so-wichtig-wie-schreiben-und-lesen/|Zitat }}
 
Beat Döbeli Honegger (Fachkern Medien und Informatik an der Pädagogischen Hochschule Luzern) gibt im Beitrag «[https://mia.phsz.ch/Informatikdidaktik/WarumInformatik Warum Informatik in der Schule?]» eine differenziertere Antwort, indem er Informatik mit neun Argumenten zur Allgemeinbildung zählt:
 
{{Box|Zitat|* Konstruktionismus-Argument ("Der Computer als Schüler:in")
 
Wissenschaftsargument ("Informatik gehört zur Allgemeinbildung, weil Informatik mit Simulation ein drittes Standbein in die Wissenschaft gebracht hat.")
 
Denkobjektargument ("Der Computer als Denkobjekt")
 
Problemlöseargument ("Informatikkenntnisse helfen auch beim Lösen von Problemen ausserhalb der Informatik.")
 
Welterklärungsargument ("Um die heutige Informationsgesellschaft verstehen und erklären zu können, sind Informatikkenntnisse notwendig.")
 
Konzeptwissenargument ("Informatikkenntnisse helfen, die Nutzung von ICT besser zu verstehen.")
 
Arbeitstechnikargument ("Mit Informatik lässt sich das präzise Planen, Arbeiten und Kommunizieren im Team üben.")
 
Motivations-/Interesseargument ("Mit Informatik lassen sich Schülerinnen und Schüler mit technischem Interesse ansprechen.")
 
Berufswahl-Argument.|Zitat }}
 
''Programmieren ist ein Teilaspekt der Informatik''. Das Modul «Programmieren» an der FMS Berufsfeld Pädagogik beschränkt sich auf folgende Ziele:
   
   


#Die Schülerinnen und Schüler der FMS Berufsfeld Pädagogik (kurz «SuS») werden später als Primarlehrpersonen eigene Ideen für den Unterricht entwickeln, wie Computerprogramme ihre Schülerinnen und Schüler beim Lernen unterstützen könnten. Sie sollen deshalb entsprechende Apps auch selbst programmieren können (z.B. ein mit der Zeit wachsendes Verzeichnis der Wörter, welche die Kinder in ihren eigenen Texten verwenden; das Verzeichnis fördert die Erweiterung des Wortschatzes der ganzen Klasse und die schwächere Primarschüler:innen können die korrekte Schreibweise der Wörter leicht «nachschlagen»). #Primarschülerinnen und Primarschüler sollen den Computer als Werkzeug für das entdeckende Lernen in «traditionellen» Fächern wie Mathematik, Geometrie oder Geografie nutzen können. Dazu eignet sich der [https://www.worldcat.org/de/title/74666394 Turtle-Grafik-Ansatz von Seymour Papert] ([https://www.worldcat.org/de/title/877077313 weiterentwickelt und aktualisiert von Yasmin B. Kafai / Quinn Burke]). Die SuS der FMS sollen sich deshalb das Konzept von Turtle-Grafiken aneignen, damit sie es später den Primarschüler:innen erklären können. Als angehende Lehrpersonen werden sie dann auch in der Lage sein, selbst Aufgaben zu stellen, die Primarschüler:innen mit Turtle-Grafiken lösen können. #Die SuS sollen auch verstehen, wie Programme und andere Unterrichtsmaterialien in Form von offenen Bildungsressourcen (Open Educational Resources, OER) veröffentlicht werden können, um Lehrkräften die Vorbereitung und Durchführung des Unterrichts zu erleichtern. Damit nützen sie Informatikanwendungen für zeitgemässe Formen der Kooperation.
[[Datei:SkriptSimulationsprogramm.png|zentriert|mini]]
   
   


==='''«Passende» Programmierumgebungen'''===
:The script comprises two blocks: "Initialisation" and "Mowing". The individual commands for the initialisation and the control of the robotic lawnmower are defined as separate blocks. The division into blocks makes the program easy to understand.


:The students should realise that programs structured in (script-) blocks are clearer and easier to understand. They should therefore implement the following extension of the simulation program using a block.
   
   


Welche Programmierumgebung eignet sich, um die genannten Ziele zu erreichen? Dazu seien einige Auswahlkriterien angeführt.
==='''Extending the algorithm to control the robotic lawnmower '''===


Die Programmierumgebung muss benutzerfreundlich sein, damit sich die SuS in der kurzen für das Modul «Programmieren» zur Verfügung stehenden Zeit mit den Grundlagen des Programmierens vertraut machen können.
:The lawnmower stops somewhere after the number of given steps. However, the lawnmower should drive back into the box in the end.


Sie muss moderne Programmier-Konzepte unterstützen (z.B. Objekt- und Ereignisorientierung), damit die SuS damit auch anspruchsvolle Programmiervorhaben bewältigen können.
:The students shall design an algorithm that leads the lawnmower back to the box and define the block "returnToBox" for this purpose.


Die Programmierumgebung muss von Primarschüler:innen genutzt werden können. Und sie muss «Turtle-Grafiken» unterstützen ([https://news.elearninginside.com/seymour-papert-logo-turtles-and-the-origin-of-educational-robots/ gemäss dem Konzept von Seymour Papert, 1967], damals realisiert mit der Programmiersprache Logo und Schildkröten – engl. turtles – als sich bewegende Objekte).
:This is not a trivial task. The algorithm for the return of the lawnmower to the box must, like the algorithm for mowing, make it possible to "go around" obstacles. While the algorithm for mowing is non-determined, the algorithm for returning to the box must always deliver the same result, i.e. it must be determined. Therefore, the algorithm for mowing cannot simply be copied. Using this example, the students can discuss very basic considerations about algorithms.


Die Programmierumgebung muss die blockbasierte Programmierung unterstützen. Die textbasierte Programmierung eignet sich für den Unterricht in der Primarschule nicht.
:The students should test their algorithm. It might be helpful to discuss possible test strategies with the students beforehand. The lawnmower stops at a random position at the end of the simulation. Would a few attempts be enough to test the algorithm for returning to the box? Or would it be better to position the lawnmower "by hand" at a few selected points and test whether it returns to the box with the self-designed algorithm?


Idealerweise unterstützt die Programmierumgebung das kooperative (Weiter-) Entwickeln von Programmen.
:In any case, the fundamental question regarding the correctness of programs is raised (once again) in the final reflection.


Die Programmierumgebung sollte schon recht verbreitet sein. Mit einer grossen Nutzerschar («community») ist eher sichergestellt, dass die Umgebung laufend weiterentwickelt und auch an sich ändernde schulische Bedürfnisse angepasst wird.
<br />


Schulisch eingesetzte Software sollte möglichst allgemein verfügbar sein und es auch bleiben, damit Bildung für alle zugänglich ist. Idealerweise wird sie von personenunabhängigen Stiftungen oder auch Institutionen der öffentlichen Hand getragen. Damit sie nicht monopolisiert werden kann, sollte sie quelloffen programmiert sein.
{{Box|Reflection|*Discuss the usefulness of the simulation from the point of view of …
::- a company offering robotic mowers and
::- a person who wants to buy a robotic mower.
*Probably in none of the completed simulations the "lawn" has been completely "mowed". Do we have to accept that even with computers, completely satisfactory solutions cannot be found for all problems? Do we have to give up warranties for programs?


Nachfolgend sind einige bekannte Programmierumgebungen, die im deutschsprachigen Raum für schulische Zwecke genutzt werden bzw. in Frage kämen, kurz beschrieben. Der Auswahl und der Reihenfolge der Programmierumgebungen liegt keine explizite Systematik zugrunde. Schliesslich wird die Wahl von Scratch als Programmierumgebung für den Unterricht an der Fachmittelschule Berufsfeld Pädagogik begründet.
*Are you aware of other areas of applications where simulations are useful or even necessary?


Im Dokument [[Datei:ModulProgrammierenDisposition-v4.odt|mini]] sind einige bekannte Programmierumgebungen, die im deutschsprachigen Raum für schulische Zwecke genutzt werden bzw. in Frage kämen, kurz beschrieben ([https://xlogo.inf.ethz.ch/release/latest/ XlogoOnline], [https://www.swisseduc.ch/informatik/karatojava/kara/ Kara], [https://scratch.mit.edu Scratch], [https://snap.berkeley.edu Snap!], [http://www.boles.de/teaching/pkjava/solist/scratchkara.html ScratchKara], [http://www.python-online.ch WebTigerJython]). Der Auswahl und der Reihenfolge der Programmierumgebungen liegt keine explizite Systematik zugrunde.
*Discuss possible risks that could arise when we transfer simulation results to reality.|Hervorhebung1 }}


==='''Gewählte Programmierumgebung: Scratch'''===


{{Box|Sample solution|* https://scratch.mit.edu/projects/696401627|Lösung }}


Für das Erreichen der Ziele des Moduls «Programmieren» an der FMS Berufsfeld Pädagogik eignet sich dieProgrammierumgebung Scratch sehr gut.
----


Scratch bietet mit der Unterstützung moderner Programmierkonzepte (Objekt- und Ereignisorientierung, Prozesskommunikation) eine Umgebung, die sich allgemein für das Programmieren an Mittelschulen eignet.
Authors: Bruno Wenk, Dieter Burkhard


Scratch eignet sich aber auch speziell für das Programmieren mit Kindern, insbesondere für das entdeckende Lernen mit Turtle-Grafiken.
Translations: Patricia Berchtel


Scratch wurde 2007 entwickelt und wird mittlerweile an vielen Schulen in verschiedenen Schulstufen eingesetzt. Scratch ist kostenlos und in über 70 Sprachen verfügbar. Die Scratch-Community umfasst 42 Millionen Projektersteller:innen. Die Scratch Foundation, eine Non-Profit-Organisation, gewährleistet die längerfristige Verfügbarkeit und Weiterentwicklung von Scratch.
 
Zu Scratch gibt es auch eine grosse Auswahl an frei verfügbaren Unterrichtsmaterialien. Scratch ist webbasiert. Die Nutzer:innen von Scratch können deshalb mit irgendwelchen Geräten mit Internetanschluss (auch Tablets) auf ihre Projekte zugreifen. Die Nutzer:innen können Projekte auch austauschen und gemeinsam oder getrennt weiterentwickeln (remix).
 
Wer Scratch offline nutzen will, kann die Programmierumgebung lokal auf dem eigenen Gerät installieren. Es gibt die App für MS-Windows, macOS, ChromeOS und Android ([https://scratch.mit.edu/download Download-Seite]). Für iOS und iPadOS (iPhone und iPad) gibt es keine Scratch-App.
 
Authors: Bruno Wenk, Dieter Burkhard


Translations: Patricia Berchtel
=='''Diskussion (im ZUMpad)'''== https://zumpad.zum.de/p/ProgrammierenITBO-Teil4


[[Kategorie:Informatik]]


{{DEFAULTSORT:Programming for prospective educators (using Scratch) }}


INDEXIEREN  
INDEXIEREN  
[[Kategorie:Informatik]]
[[Kategorie:Programmieren]]  
[[Kategorie:Programmieren]]  
[[Kategorie:Scratch]]  
[[Kategorie:Scratch]]  
[[Kategorie:Lernpfad]]
[[Kategorie:Simulation]]

Version vom 28. Juli 2023, 13:03 Uhr


| ⇠ back to main page | ⇠ unit 1 | ⇠ unit 2 | ⇠ unit 3 | unit 4 |


==Guidance for students (Open Document Format ODF)==

Handout for teachers

Objectives
  • The students shall understand a simulation as a way of searching a solution for a problem.
  • They will analyse and test the provided example of the simulation of a robotic lawnmower.
  • The students supplement the simulation example with an algorithm that they will develop on their own.
  • They shall understand the block concept as a means to clearly outline programs.


Introduction

A computer simulation is a program that models a system (e.g. the streets in a neighbourhood with high traffic volumes) and shows (often with a visualisation) how the simulated system behaves under different conditions (e.g. if speed limit 30 was introduced, or if some streets were converted to one-way streets). Computer simulations are useful, for example, when experiments with the real system of interest are too costly, too dangerous or even impossible. And even when experiments are possible, comparison with simulations often helps to better understand the behaviour of the individual components of a system.
In this unit, the students analyse the example of a simulation program for a lawn mowing robot. They supplement the program with a self-developed algorithm that causes the robotic lawnmower to "return" to its box at the end of the simulation. The students learn about and apply the concept of structuring programs with blocks.
The lesson might be started with an advance organiser: Who knows of robotic lawnmowers or hoovers from experience (at home, from neighbours, etc.)? Do these robots mow or hoover the lawn or room completely, right down to the last corner around all obstacles? Can this be proven, estimated or verified? What do you think about a simulation?


Getting familiar with the example program


BildschirmaufnahmeMähroboterSimulation.png


For this unit, the students need the program (project) "RobotLawnMowerSimulation-Template". It is published on the Scratch platform and can be downloaded from there to one´s own computer: https://scratch.mit.edu/projects/878189075/
The program simulates a robotic lawnmower on a plot of land with shrubs. When the lawnmower touches an obstacle (a shrub, the edge of the plot), it backs up a bit and then rotates through a random angle between 15 and 30 degrees. Then the lawnmower continues straight ahead until it touches another obstacle.
The students should start the program several times and take a screenshot of the simulation result. When the students compare the paths of the lawnmower, they should realise that the results differ and understand why this is so.
Although the simulation always ends after the same number of steps (the algorithm is terminating), the result of the program is always different. The result of the program execution is non-determined: In each simulation, the paths are different and the robotic lawnmower ends up in a different place.
But is the algorithm at least robust, i.e. does it still work reliably when the execution conditions change?
The students must understand what an algorithm is. They need to take note of the terms terminating, non-determined and robust. Thus they should become aware of the fact that an algorithm does not necessarily always give exactly the same solution when one runs it several times.
The students should modify the program in order to assess the results of the simulation under different conditions. For this purpose, they place an additional obstacle (house) on the "plot of land" .
The students must adjust the relevant execution condition in the block "Mowing" so that the robotic lawnmower recognises the house as an obstacle.


CodeSequenzHindernisErkennen.png


Perhaps the students need support in this step. They should make sure that the robotic lawnmower doesn't "mow through the house".

The block concept for the structuring of programs

The script of the simulation program is very simple.


SkriptSimulationsprogramm.png


The script comprises two blocks: "Initialisation" and "Mowing". The individual commands for the initialisation and the control of the robotic lawnmower are defined as separate blocks. The division into blocks makes the program easy to understand.
The students should realise that programs structured in (script-) blocks are clearer and easier to understand. They should therefore implement the following extension of the simulation program using a block.


Extending the algorithm to control the robotic lawnmower

The lawnmower stops somewhere after the number of given steps. However, the lawnmower should drive back into the box in the end.
The students shall design an algorithm that leads the lawnmower back to the box and define the block "returnToBox" for this purpose.
This is not a trivial task. The algorithm for the return of the lawnmower to the box must, like the algorithm for mowing, make it possible to "go around" obstacles. While the algorithm for mowing is non-determined, the algorithm for returning to the box must always deliver the same result, i.e. it must be determined. Therefore, the algorithm for mowing cannot simply be copied. Using this example, the students can discuss very basic considerations about algorithms.
The students should test their algorithm. It might be helpful to discuss possible test strategies with the students beforehand. The lawnmower stops at a random position at the end of the simulation. Would a few attempts be enough to test the algorithm for returning to the box? Or would it be better to position the lawnmower "by hand" at a few selected points and test whether it returns to the box with the self-designed algorithm?
In any case, the fundamental question regarding the correctness of programs is raised (once again) in the final reflection.


Reflection
  • Discuss the usefulness of the simulation from the point of view of …
- a company offering robotic mowers and
- a person who wants to buy a robotic mower.
  • Probably in none of the completed simulations the "lawn" has been completely "mowed". Do we have to accept that even with computers, completely satisfactory solutions cannot be found for all problems? Do we have to give up warranties for programs?
  • Are you aware of other areas of applications where simulations are useful or even necessary?
  • Discuss possible risks that could arise when we transfer simulation results to reality.



Authors: Bruno Wenk, Dieter Burkhard

Translations: Patricia Berchtel


==Diskussion (im ZUMpad)== https://zumpad.zum.de/p/ProgrammierenITBO-Teil4


INDEXIEREN