# SOME DESCRIPTIVE TITLE
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-07-31 10:14+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#. type: Content of: <h1>
#: src/plm/universe/bugglequest/BuggleWorld.html:2
msgid "BuggleWorld"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/bugglequest/BuggleWorld.html:3
msgid ""
"This world was invented by Lyn Turbak, at Wellesley College. It is full of "
"Buggles, little animals understanding simple orders, and offers numerous "
"possibilities of interaction with the world: taking or dropping objects, "
"paint the ground, hit walls, etc."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/bugglequest/BuggleWorld.html:8
msgid "Methods understood by buggles"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:10
msgid "<b>Moving</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:10
msgid "(See also the note on exceptions, below)"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:11 src/lessons/turmites/universe/TurmiteWorld.html:10
msgid "<b>Turn left"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:11 src/lessons/turmites/universe/TurmiteWorld.html:10
msgid "Turn right"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:11 src/lessons/turmites/universe/TurmiteWorld.html:10
msgid "Turn back"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:11 src/lessons/turmites/universe/TurmiteWorld.html:10
msgid "Moving forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:11 src/lessons/turmites/universe/TurmiteWorld.html:10
msgid "Moving back</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:12 src/lessons/turmites/universe/TurmiteWorld.html:11
msgid "[!java|c]void [/!]left()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:13 src/lessons/turmites/universe/TurmiteWorld.html:11
msgid "[!java|c]void [/!]right()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:14 src/lessons/turmites/universe/TurmiteWorld.html:11
msgid "[!java|c]void [/!]back()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:15
msgid ""
"[!java|c]void [/!][!python|java|scala]forward()[/!][!c]stepForward()[/!] or "
"[!java|c]void [/!]forward([!java|c]int [/!]steps[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:16
msgid ""
"[!java|c]void [/!][!python|java|scala]backward()[/!][!c]stepBackward()[/!] "
"or [!java]void [/!]backward([!java|c]int [/!]steps[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:17
msgid "<b>Get X coordinate"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:17
msgid "Get Y coordinate"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:17
msgid "Set X coordinate"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:17
msgid "Set Y coordinate"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:17
msgid "Set position</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:18
msgid "[!java|c]int [/!]getX()[!scala]:Int[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:19
msgid "[!java|c]int [/!]getY()[!scala]:Int[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:20
msgid "[!java|c]void [/!]setX([!java|c]int [/!]x[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:21
msgid "[!java|c]void [/!]setY([!java|c]int [/!]y[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:22
msgid ""
"[!java|c]void [/!]setPos([!java|c]int [/!]x[!scala]:Int[/!], [!java|c]int "
"[/!]y[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:23
msgid ""
"Note that the point (0,0) is on the top left corner, as it is often the case "
"in Computer Science."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:25
msgid "<b>Information on the buggle</b>"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:26
msgid "<b>Get the color of the body"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:26
msgid "Set the color of the body</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:27
msgid "[!java|c]Color [/!]getBodyColor()[!scala]:Color[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:28
msgid "[!java|c]void [/!]setBodyColor([!java|c]Color [/!]c[!scala]:Color[/!])"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:29
msgid "<b>Look for a wall forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:29
msgid "Look for a wall backward</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:30
msgid "[!java]boolean [/!][!c]int [/!]isFacingWall()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:31
msgid "[!java]boolean [/!][!c]int [/!]isBackingWall()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:32
msgid "<b>Get heading"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:32
msgid "Set heading</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:32
msgid "valid directions are:"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:33
msgid "[!java|c]Direction [/!]getDirection()[!scala]:Direction[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:34
msgid ""
"[!java|c]void [/!]setDirection([!java|c]Direction "
"[/!]dir[!scala]:Direction[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:35
msgid ""
"[!scala|java|python]Direction.[/!]NORTH, "
"[!scala|java|python]Direction.[/!]EAST, "
"[!scala|java|python]Direction.[/!]SOUTH and "
"[!scala|java|python]Direction.[/!]WEST"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:36
msgid "Check whether the buggle is currently <b>selected in the interface</b>"
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/bugglequest/BuggleWorld.html:37 src/plm/universe/turtles/TurtleWorld.html:76 src/lessons/recursion/hanoi/universe/HanoiWorld.html:27
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isSelected()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:39
msgid "<b>About the brush</b>"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:40
msgid "<b>Brush down"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:40
msgid "Brush up"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:40
msgid "Get brush position</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:41
msgid "[!java|c]void [/!]brushUp()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:42
msgid "[!java|c]void [/!]brushDown()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:43
msgid "[!java]boolean [/!][!c]int [/!]isBrushDown()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:44
msgid "<b>Change the brush color"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:44
msgid "Get the color of the brush</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:45
msgid "[!java|c]void [/!]setBrushColor([!java|c]Color [/!]c[!scala]:Color[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:46
msgid "[!java|c]Color [/!]getBrushColor()[!scala]:Color[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:48
msgid "<b>Interacting with the world</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:49 src/lessons/turmites/universe/TurmiteWorld.html:15
msgid "<b>Get the color of the ground</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:50 src/lessons/turmites/universe/TurmiteWorld.html:15
msgid "[!java|c]Color [/!]getGroundColor()[!scala]:Color[/!]"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:52
msgid "<b>Look for a baggle on the ground"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:52
msgid "Look for a baggle in bag"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:52
msgid "Pickup a baggle"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:52
msgid "Drop a baggle</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:53
msgid "(see the note on exceptions)"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:54
msgid "[!java]boolean [/!][!c]int [/!]isOverBaggle()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:55
msgid "[!java]boolean [/!][!c]int [/!]isCarryingBaggle()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:56
msgid "[!java]void [/!]pickupBaggle()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:57
msgid "[!java]void [/!]dropBaggle()"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:58 src/plm/universe/bugglequest/BuggleWorld.html:70 src/plm/universe/bugglequest/BuggleWorld.html:71 src/plm/universe/bugglequest/BuggleWorld.html:72 src/plm/universe/bugglequest/BuggleWorld.html:73 src/plm/universe/bugglequest/BuggleWorld.html:74 src/plm/universe/bugglequest/BuggleWorld.html:75 src/plm/universe/bugglequest/BuggleWorld.html:76 src/plm/universe/bugglequest/BuggleWorld.html:77 src/plm/universe/bugglequest/BuggleWorld.html:78 src/plm/universe/bugglequest/BuggleWorld.html:79 src/plm/universe/bugglequest/BuggleWorld.html:80 src/plm/universe/bugglequest/BuggleWorld.html:81 src/plm/universe/bugglequest/BuggleWorld.html:82 src/lessons/welcome/Main.html:9 src/lessons/welcome/Main.html:92 src/lessons/welcome/Main.html:175 src/lessons/welcome/Main.html:255 src/lessons/welcome/Main.html:349 src/lessons/welcome/Main.html:429 src/lessons/welcome/Main.html:469 src/plm/universe/turtles/TurtleWorld.html:82 src/plm/universe/turtles/TurtleWorld.html:83 src/plm/universe/turtles/TurtleWorld.html:84 src/plm/universe/turtles/TurtleWorld.html:85 src/plm/universe/turtles/TurtleWorld.html:86 src/plm/universe/turtles/TurtleWorld.html:87 src/plm/universe/turtles/TurtleWorld.html:88 src/plm/universe/turtles/TurtleWorld.html:89 src/plm/universe/turtles/TurtleWorld.html:90 src/plm/universe/turtles/TurtleWorld.html:91 src/plm/universe/turtles/TurtleWorld.html:92 src/plm/universe/turtles/TurtleWorld.html:93 src/plm/universe/turtles/TurtleWorld.html:94
msgid "&nbsp;"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:60
msgid "<b>Look for a message"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:60
msgid "Add a message"
msgstr ""

#. type: Content of: <table><tr><td><b>
#: src/plm/universe/bugglequest/BuggleWorld.html:60
msgid "Read the message"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:60
msgid "Erase the message</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:61
msgid "[!java]boolean [/!][!c]int [/!]isOverMessage()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:62
msgid ""
"[!java]void [/!]writeMessage([!java]String [/!][!c]char* "
"[/!]msg[!scala]:String[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:63
msgid "[!java]String [/!][!c]char* [/!]readMessage()[!scala]:String[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:64
msgid "[!java]void [/!]clearMessage()"
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/bugglequest/BuggleWorld.html:67 src/plm/universe/turtles/TurtleWorld.html:79
msgid "Valid colors"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:69 src/plm/universe/turtles/TurtleWorld.html:81
msgid "Name"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:69 src/plm/universe/turtles/TurtleWorld.html:81
msgid "Color"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:70 src/plm/universe/turtles/TurtleWorld.html:82
msgid "[!scala|java|python]Color.[/!]black"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:71 src/plm/universe/turtles/TurtleWorld.html:83
msgid "[!scala|java|python]Color.[/!]blue"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:72 src/plm/universe/turtles/TurtleWorld.html:84
msgid "[!scala|java|python]Color.[/!]cyan"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:73 src/plm/universe/turtles/TurtleWorld.html:85
msgid "[!scala|java|python]Color.[/!]darkGray"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:74 src/plm/universe/turtles/TurtleWorld.html:86
msgid "[!scala|java|python]Color.[/!]gray"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:75 src/plm/universe/turtles/TurtleWorld.html:87
msgid "[!scala|java|python]Color.[/!]green"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:76 src/plm/universe/turtles/TurtleWorld.html:88
msgid "[!scala|java|python]Color.[/!]lightGray"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:77 src/plm/universe/turtles/TurtleWorld.html:89
msgid "[!scala|java|python]Color.[/!]magenta"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:78 src/plm/universe/turtles/TurtleWorld.html:90
msgid "[!scala|java|python]Color.[/!]orange"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:79 src/plm/universe/turtles/TurtleWorld.html:91
msgid "[!scala|java|python]Color.[/!]pink"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:80 src/plm/universe/turtles/TurtleWorld.html:92
msgid "[!scala|java|python]Color.[/!]red"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:81 src/plm/universe/turtles/TurtleWorld.html:93
msgid "[!scala|java|python]Color.[/!]white"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/bugglequest/BuggleWorld.html:82 src/plm/universe/turtles/TurtleWorld.html:94
msgid "[!scala|java|python]Color.[/!]yellow"
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/bugglequest/BuggleWorld.html:85
msgid "Note on exceptions"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/bugglequest/BuggleWorld.html:86
msgid ""
"Regular buggles throw a BuggleWallException exception if you ask them to "
"traverse a wall.  They throw a NoBaggleUnderBuggleException exception if you "
"ask them to pickup a baggle from an empty cell, or a "
"AlreadyHaveBaggleException exception if they already carry a baggle.  Trying "
"to drop a baggle on a cell already containing one throws an "
"AlreadyHaveBaggleException exception.  Dropping a baggle when you have none "
"throws a DontHaveBaggleException."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/bugglequest/BuggleWorld.html:93
msgid ""
"SimpleBuggles (ie, the one used in first exercises) display an error message "
"on problem so that you don't need to know what an exception is."
msgstr ""

#. type: Content of: <h1>
#: src/plm/universe/bat/BatWorld.html:2
msgid "BatWorld"
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/bat/BatWorld.html:4
msgid ""
"This world is a simplistic testing environment largely inspired from the "
"http://codingbat.com invented by Nick Parlente."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/bat/BatWorld.html:7
msgid ""
"The typical exercises are very short ones, aiming at improving the tactical "
"programming abilities of the students. That is to say that you will be "
"presented a quite long list of very little exercises about rather simple "
"things. The idea is to train you on these issues until they become automatic "
"to you."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/bat/BatWorld.html:13
msgid ""
"In contrary to the other worlds, the BatWorld does not provide any fancy "
"abstraction nor visualization. You have to fill a function, which gets "
"called for a bunch of parameter sets, and that's it."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/bat/BatWorld.html:17
msgid ""
"For more information, you should refer to the CodingBat.com documentation, "
"which contains for example a very useful documentation on boolean operators: "
"http://codingbat.com/doc/ifboolean.html"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/Main.html:2 src/lessons/welcome/short_desc.html:2
msgid "First steps"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/Main.html:4
msgid ""
"This first lesson will lead your first steps in programming. It is intended "
"for beginners. List of seen notions per exercise:"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:10 src/lessons/welcome/Main.html:93 src/lessons/welcome/Main.html:176 src/lessons/welcome/Main.html:256 src/lessons/welcome/Main.html:350 src/lessons/welcome/Main.html:430 src/lessons/welcome/Main.html:470 src/lessons/welcome/instructions/Instructions.html:2
msgid "Instructions"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:11 src/lessons/welcome/Main.html:94 src/lessons/welcome/Main.html:177 src/lessons/welcome/Main.html:257 src/lessons/welcome/Main.html:351 src/lessons/welcome/Main.html:431 src/lessons/welcome/Main.html:471
msgid "Comments"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:12 src/lessons/welcome/Main.html:95 src/lessons/welcome/Main.html:178 src/lessons/welcome/Main.html:258 src/lessons/welcome/Main.html:352 src/lessons/welcome/Main.html:432 src/lessons/welcome/Main.html:472
msgid "Conditionals/ Expressions"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:13 src/lessons/welcome/Main.html:79 src/lessons/welcome/Main.html:96 src/lessons/welcome/Main.html:179 src/lessons/welcome/Main.html:259 src/lessons/welcome/Main.html:353 src/lessons/welcome/Main.html:433 src/lessons/welcome/Main.html:473 src/lessons/welcome/loopwhile/LoopWhile.html:2
msgid "While loops"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:14 src/lessons/welcome/Main.html:97 src/lessons/welcome/Main.html:180 src/lessons/welcome/Main.html:260 src/lessons/welcome/Main.html:354 src/lessons/welcome/Main.html:434 src/lessons/welcome/Main.html:474
msgid "Variables"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:15 src/lessons/welcome/Main.html:98 src/lessons/welcome/Main.html:134 src/lessons/welcome/Main.html:181 src/lessons/welcome/Main.html:261 src/lessons/welcome/Main.html:355 src/lessons/welcome/Main.html:435 src/lessons/welcome/Main.html:475 src/lessons/welcome/loopfor/LoopFor.html:2
msgid "For loops"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:16 src/lessons/welcome/Main.html:99 src/lessons/welcome/Main.html:182 src/lessons/welcome/Main.html:262 src/lessons/welcome/Main.html:356 src/lessons/welcome/Main.html:436 src/lessons/welcome/Main.html:476
msgid "Do/While loops"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:17 src/lessons/welcome/Main.html:100 src/lessons/welcome/Main.html:162 src/lessons/welcome/Main.html:183 src/lessons/welcome/Main.html:263 src/lessons/welcome/Main.html:357 src/lessons/welcome/Main.html:437 src/lessons/welcome/Main.html:477 src/lessons/welcome/methods/basics/Methods.html:2
msgid "Methods"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:18 src/lessons/welcome/Main.html:101 src/lessons/welcome/Main.html:184 src/lessons/welcome/Main.html:264 src/lessons/welcome/Main.html:358 src/lessons/welcome/Main.html:438 src/lessons/welcome/Main.html:478
msgid "Switch"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:19 src/lessons/welcome/Main.html:102 src/lessons/welcome/Main.html:185 src/lessons/welcome/Main.html:265 src/lessons/welcome/Main.html:359 src/lessons/welcome/Main.html:439 src/lessons/welcome/Main.html:479
msgid "Arrays"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:23 src/lessons/welcome/environment/Environment.html:2
msgid "Welcome in the Buggles' World"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:37
msgid "Java Instructions"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:51 src/lessons/welcome/instructions/InstructionsDrawG.html:2
msgid "Writing more complex programs"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:65 src/lessons/welcome/conditions/Conditions.html:2
msgid "Conditional instructions"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:106 src/lessons/welcome/loopwhile/BaggleSeeker.html:2
msgid "Baggle Seeking"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:120 src/lessons/welcome/variables/Variables.html:2
msgid "Storing and manipulating data"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:148 src/lessons/welcome/loopdowhile/LoopDoWhile.html:2
msgid "Do .. while loops"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:188 src/lessons/welcome/methods/basics/MethodsDogHouse.html:2
msgid "Building methodically"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:202
msgid "Methods returning a result"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:215 src/lessons/welcome/methods/args/MethodsArgs.html:2
msgid "Methods with parameters"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:229 src/lessons/welcome/methods/picture/PictureMono1.html:2
msgid "Methodically drawing"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:242 src/lessons/welcome/methods/picture/PictureMono2.html:2
msgid "Methodically drawing (only bigger)"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:268 src/lessons/welcome/methods/picture/PictureMono3.html:2
msgid "Drawing bigger and bigger"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:281
msgid "Even more pattern to draw"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:295
msgid "Buggle Dance Revolution"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:309
msgid "Buggle Dance Revolution 2"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:323 src/lessons/welcome/methods/slug/SlugHunting.html:2
msgid "Slug Hunting"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:336 src/lessons/welcome/methods/slug/SlugTracking.html:2
msgid "Slug Tracking"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:362 src/lessons/welcome/traversal/Snake.html:2
msgid "Snake World"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:376
msgid "Knitting and Arrays"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:390
msgid "Knitting, Arrays and modulos"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:403 src/lessons/welcome/traversal/column/TraversalByColumn.html:2
msgid "Traversal by column"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:416 src/lessons/welcome/traversal/line/TraversalByLine.html:2
msgid "Traversal by line"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:442 src/lessons/welcome/traversal/zigzag/TraversalZigZag.html:2
msgid "Zig-zag traversal"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:455 src/lessons/welcome/traversal/diagonal/TraversalDiagonal.html:2
msgid "Diagonal Traversal"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:483
msgid "Meaning of the symbols"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:486
msgid "Introducing the concept"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:489
msgid "Working on the concept"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:492
msgid "Concept assumed mastered"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/Main.html:495
msgid "Concept not mandated by the exercise"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/Main.html:501
msgid "What will I learn?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/Main.html:502
msgid ""
"You will learn the very basics of programming. At least, you will be "
"presented the most important concepts, allowing you to read most simple "
"algorithms. You will not be able to write or read full programs because you "
"will still not know about objects, but you will master what is called "
"\"Tactical programming\", meaning that you will master the syntax enough to "
"not have any issue with it, allowing you to focus on the fundamental "
"problems of what you want to solve instead of struggling with syntactic "
"difficulties."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/short_desc.html:3
msgid ""
"This first lesson will lead your first steps in programming. It is intended "
"for beginners."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/short_desc.html:6
msgid ""
"If you are not sure, go for this lesson that will teach you the bases of "
"programming."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:4
msgid ""
"You just started the Programmer's Learning Machine. This is a Learning "
"Management System aiming at teaching the art of computer programming through "
"interactive exercises. It is constituted by a set of exercises grouped by "
"lessons, allowing you to practice at your own pace. Currently, the "
"environment is configured to be programmed in the [!thelang/] programming "
"language, but you can change it from the Language menu if you want, or by "
"clicking on the [!thelang/] icon at the right of the status bar below."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:11
msgid "In this first lesson, the buggles will lead your first steps in programming."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/environment/Environment.html:13
msgid "The <i>buggles</i>? What is this??"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:15
msgid ""
"The buggles are little animals obeying any order you may give them. In each "
"exercise, you have to provide them with the right instructions so that the "
"world turns into the objective of the exercise. For example in this "
"exercise, you should instruct your buggle to move forward once. You can see "
"that by checking the difference between the <i>World</i> view and the "
"<i>Objective</i> one.  Depending on the exercise (and your settings in the "
"Language menu), your code must be written in either C, Java, Python or "
"Scala."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/environment/Environment.html:23
msgid "Working environment"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:25
msgid ""
"Before going any further, get familiar with the working environment. Have a "
"look at the several elements composing the main window, move your mouse over "
"them to show the tooltip, and experiment with the elements to see what they "
"do.  The white area below is the console: this is where errors and messages "
"get displayed."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:31
msgid ""
"If your code contains errors (and code always do at some point), the "
"computer will display error messages in the console. You obviously have to "
"fix the errors to pass the exercises. The messages that get displayed may "
"sound scary at first glance, but don't panic. The compiler is only somehow "
"limited in its communication abilities, but he's not mean. If you look "
"closer, the solution to solve your issue is written in the middle of those "
"cryptic messages. You will see, with a bit of habit, we get used to it."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/environment/Environment.html:39
msgid "What am I supposed to do?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:41
msgid ""
"It's time to write your first program. Simply ask your buggle to move one "
"step forward using the Source Code pane. For that, simply write the "
"following code (clicking on the interactive controls is not enough: You have "
"to write the code after experimenting interactively)."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/environment/Environment.html:45 src/lessons/welcome/instructions/Instructions.html:46
#, no-wrap
msgid "[!java|scala|python]forward()[!java];[/!][/!][!c]stepForward();[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/environment/Environment.html:46 src/lessons/welcome/loopfor/LoopFor.html:57 src/lessons/welcome/bdr/BDR.html:188
msgid "[!java|c]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:46
msgid ""
"Do not forget the final <code>;</code> which tells the compiler that the "
"instruction is over (yes, computers are so dumb that they cannot "
"<i>guess</i> obvious stuff like this)."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/environment/Environment.html:48 src/lessons/welcome/instructions/Instructions.html:35 src/lessons/welcome/variables/Variables.html:78 src/lessons/welcome/variables/Variables.html:152 src/lessons/welcome/loopfor/LoopFor.html:80 src/lessons/welcome/loopdowhile/LoopDoWhile.html:54 src/lessons/welcome/array/basics/Array1.html:183 src/lessons/welcome/array/basics/Array1.html:209 src/lessons/welcome/methods/args/MethodsArgs.html:66 src/lessons/welcome/methods/picture/MethodsPicture.html:40 src/lessons/welcome/bdr/BDR.html:60 src/lessons/welcome/bdr/BDR.html:195 src/lessons/welcome/bdr/BDR2.html:130 src/lessons/turmites/langton/Langton.html:32 src/lessons/turmites/helloturmite/HelloTurmite.html:65 src/lessons/sort/basic/comb/AlgCombSort.html:39 src/lessons/recursion/cons/universe/ConsWorld.html:35 src/lessons/recursion/cons/Length.html:8 src/lessons/recursion/lego/square/FourSquare.html:46 src/lessons/maze/pledge/PledgeMaze.html:68 src/lessons/welcome/bat/bool1/Max1020.html:6
msgid "[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/environment/Environment.html:50
msgid "Once done, click on run. You can proceed to next exercise once it works."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/instructions/Instructions.html:4
msgid ""
"Congratulations! You just wrote your first program! You got the idea now: "
"programming is nothing more than giving simple instructions to the computer "
"that blindly apply them. The main difficulty is to explain stuff to "
"something as stupid as a computer..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:9
msgid ""
"Programs are mainly suites of method calls, which are no more than a list of "
"simple orders given to the machine. It is very similar to a recipe stating "
"<i>Melt the chocolate pieces, add sugar, cool the mix and serve</i>.  In "
"your programs, such built instructions are called functions or methods, and "
"you should add parenthesis to invoke them:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/Instructions.html:14
#, no-wrap
msgid "nameOfTheMethod()"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:16
msgid ""
"[!thelang] wants to have the instructions separated by semi-columns "
"(;)[!python|scala] or by new lines[/!].  The previous example would thus be "
"written in the following way[!python|scala] (you can also add semi-columns "
"at the end of the lines, but this is not mandatory)[/!]."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/Instructions.html:22
#, no-wrap
msgid ""
"meltTheChocolatePieces()[!java|c];[/!]\n"
"addSugar()[!java|c];[/!]\n"
"coolMix()[!java|c];[/!]\n"
"serve()[!java|c];[/!]\n"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/instructions/Instructions.html:28 src/lessons/welcome/variables/Variables.html:145
msgid "[!python|scala]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:29
msgid ""
"It could also be written in the following way, but it's generally considered "
"as a bad practice to group several instructions on the same line since it "
"greatly hinders the readability."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/Instructions.html:33
#, no-wrap
msgid "meltTheChocolatePieces(); addSugar(); coolMix(); serve()\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:37
msgid ""
"Of course, these specific methods do not exist by default in [!thelang], but "
"it may be possible to define them by yourself (we'll see later how to define "
"your how methods)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:41
msgid ""
"For now, we'll simply go for the buggle instructions. There is a method for "
"each button of the interactive control panel. To achieve the same effect "
"than the <b>forward</b> button (making the buggle moving one step forward), "
"you need to write the following in the editor:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:47
msgid ""
"Likewise, to achieve the same effect than the "
"<b>[!java|scala|python]backward[/!][!c]stepBackward[/!]</b>, <b>left</b> and "
"<b>right</b> buttons, you need to use respectively:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/Instructions.html:50
#, no-wrap
msgid ""
"backward()[!java|c];[/!]\n"
"left()[!java|c];[/!]\n"
"right()[!java|c];[/!]\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:55
msgid ""
"The <b>mark</b> button is a bit particular, since it correspond to two "
"methods: the first one moves the pen up while the second moves it down."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/Instructions.html:58
#, no-wrap
msgid ""
"brushUp()[!java|c];[/!]\n"
"brushDown()[!java|c];[/!]\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:61
msgid ""
"The buggle offers other methods, that are presented from the \"Help/about "
"this world\" menu and will be introduced on need."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/instructions/Instructions.html:65 src/lessons/welcome/conditions/Conditions.html:109 src/lessons/welcome/loopwhile/LoopWhile.html:35 src/lessons/welcome/loopwhile/BaggleSeeker.html:9 src/lessons/welcome/variables/Variables.html:119 src/lessons/welcome/loopfor/LoopFor.html:82 src/lessons/welcome/methods/basics/Methods.html:96 src/lessons/welcome/methods/basics/MethodsDogHouse.html:38 src/lessons/welcome/methods/returning/MethodsReturning.html:50 src/lessons/welcome/methods/args/MethodsArgs.html:70 src/lessons/welcome/methods/slug/SlugHunting.html:19 src/lessons/welcome/methods/slug/SlugTracking.html:23 src/lessons/welcome/bdr/BDR.html:150 src/lessons/welcome/bdr/BDR2.html:132 src/lessons/maze/wallfollower/WallFollowerMaze.html:18 src/lessons/maze/pledge/PledgeMaze.html:37 src/lessons/maze/shortestpath/ShortestPathMaze.html:23 src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:22
msgid "Exercise goal"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/instructions/Instructions.html:65
msgid ""
"<a name=\"Objectives\"/> Our second program will be a bit more complicated, "
"but not much. The goal for your buggle is simply to draw a house (a box), "
"and hide inside. Check the objective world to see exactly what this means."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:70
msgid ""
"Use your brush to mark the ground as you walk. Start marking the ground with "
"<code>brushDown()</code>, and stop it with <code>brushUp()</code> afterward "
"(e.g., to enter your house without marking its ground). The full list of all "
"instructions understood by your buggle can be found in \"Help/About this "
"world\"."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/instructions/Instructions.html:75
msgid "After this exercise"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:76
msgid ""
"When switching to the next exercise, please note that there is a "
"sub-exercise following this one.  By default, it is hidden in the menu and "
"you have to open the sub-menu to see it.  When you switch the exercise, most "
"of the exercises are hidden because the tree is folded, as follows:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/Instructions.html:81
msgid ""
"You have to click on the little symbol to the left of the buggle to unfold "
"the tree, as follows:"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/instructions/InstructionsDrawG.html:3
msgid ""
"Now that we know how to draw things on the board, we'll enjoy this ability "
"and draw a beautiful G on the board (check Objective panel for details on "
"what is expected)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:7
msgid ""
"When you write a quite complex program, it is sometimes useful to <b>add "
"comments</b> to simplify the code reviews afterward. Here for example, it's "
"quite easy to get lost in the drawing process, and you may want to add "
"comments like <i>vertical bar done</i> or <i>finished drawing the G. Time to "
"move back to initial position</i>. Commenting your code is almost mandatory "
"if you (or someone else) want to read it afterward, although over-commenting "
"(describing obvious stuff) is a bad idea as the important idea get lost in "
"the noise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:15
msgid ""
"There is [!java]three[/!][!python|scala|c]two[/!] types of comments in "
"[!thelang], instructing the "
"[!java|scala|c]compiler[/!][!python]interpreter[/!] to not read the text you "
"add for humans:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:19
msgid ""
"<b>Comments on a single line</b>. When the "
"[!java|scala|c]compiler[/!][!python]interpreter[/!] encounters the symbol "
"[!java|scala|c]//[/!][!python]#[/!], it ignores the end of the line."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:21
msgid ""
"<b>Comments on several lines</b>. The "
"[!java|scala|c]compiler[/!][!python]interpreter[/!] ignores anything placed "
"between [!java|scala|c]the symbols /* and */ even if they are placed on "
"differing lines.[/!] [!python]a line beginning with ''' until the next line "
"ending with '''.[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:28
#, no-wrap
msgid ""
"methodCallReadByThe[!java|scala|c]Compiler[/!][!python]Interpreter[/!]()[!java|c];[/!] "
"<span class=\"comment\">[!java|scala|c]//[/!][!python]#[/!] all this is "
"ignored</span>\n"
"otherCall()[!java|c];[/!] [!java|scala|c]<span class=\"comment\">/* This "
"is</span>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "
"<span class=\"comment\"> also ignored */</span>[/!]\n"
"[!python]<span class=\"comment\">''' This is</span>\n"
"<span class=\"comment\">also ignored  '''</span>[/!]\n"
"yetAnotherCall()[!java|c];[/!]\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:35
msgid ""
"There is a third kind of comments in Java, between /** and */, which are "
"read by a specific program called JavaDoc to generate automatically the "
"documentation explaining how to use the code. These comments must follow a "
"very precise formalism."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/instructions/InstructionsDrawG.html:40
msgid ""
"The comments on several lines are often used to document how to use the "
"code, while others are more used to describe how this code works."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/conditions/Conditions.html:4
msgid ""
"Programs made of simple suite of instructions similar to previous exercise "
"are quite boring. They always do the same thing, and cannot react to "
"external conditions. A <b>conditional</b> let the program adapt by doing "
"something like <i>if it's raining, take an umbrella</i>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:9
msgid "The [!thelang] syntax is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/conditions/Conditions.html:11
#, no-wrap
msgid ""
"[!java|scala|c]if (<b>condition</b>) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfTrue();</b>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoNextIfTrue();</b>\n"
"}[/!][!python]if <b>condition</b>:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfTrue()</b>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoNextIfTrue()</b>[/!]\n"
"<b>whatToDoAnyway()[!java|c];[/!]</b>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:19
msgid ""
"If the condition is true, the code of the next block will be executed and "
"then it will continue with the rest of the code.  If the condition is false, "
"the next block is ignored and the execution continues after it.  The "
"conditional block can contain several instructions, it can even contain "
"other tests, along with their sub-blocks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:23
msgid ""
"In this example, the instructions <code>whatToDoIfTrue()</code> and "
"<code>whatToDoNextIfTrue()</code> will be executed if and only if the "
"condition is true, while the instruction <code>whatToDoAnyway()</code> will "
"be executed whether or not the condition is true."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:28
msgid ""
"In [!thelang], the blocks of code are [!java|scala|c]enclosed between curly "
"brackets: a { sign opens the block, while a } sign closes it.  White spaces "
"are not important[/!][!java|c].[/!][!scala], provided that your instructions "
"are still separated with a semi-column or an end of line.[/!] "
"[!java|scala|c]It is still very important to correctly indent your code to "
"keep it readable.[/!] [!python]marked by the indentation: every lines that "
"are a bit shifted to the right with white spaces belong to the block. Quite "
"often, people use 4 spaces for indentation, but it works if you use more or "
"less spaces. Simply, any lines of the block must use the same amount of "
"spaces.  The end of Python code blocks are not marked by any specific char.  "
"Indenting lines starts a block and unindenting ends it. Do not forget the "
"colon (:) at the end of the <code>if</code> line, python needs it to know "
"that a new block begins. The fact that python relies on indentation to "
"delimit blocks is a very good property for beginners: it will force you to "
"adhere to strict code presentation standards.[/!] It is very easy to get "
"lost in your own code if it's not properly indented, so you want to clean it "
"up so that working on your code remains pleasant and productive."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:44
msgid ""
"All indentations of a given block must be consistent, and it is not possible "
"to cut a block. The two following codes are incorrect and will raise errors."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/conditions/Conditions.html:47
#, no-wrap
msgid ""
"if <b>condition</b>:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDo()</b>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoNext()</b> <span "
"class=\"comment\"># one space too much </span>\n"
"<b>whatToDoAnyway()</b>\n"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/conditions/Conditions.html:52
#, no-wrap
msgid ""
"if <b>condition</b>:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDo()</b>\n"
"<b>whatToDoAnyway()</b>\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoNext()</b> <span class=\"comment\"># this "
"block is not hanging to a condition line</span>\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:58
msgid ""
"The condition must be a "
"<code>[!c]int[/!][!java]boolean[/!][!scala|python]Boolean[/!]</code> "
"expression.  The inner block of code will get executed if the expression is "
"evaluated to <code>[!c]1[/!][!java|scala]true[/!][!python]True[/!]</code> "
"and it will be ignored if it is "
"<code>[!c]0[/!][!java|scala]false[/!][!python]False[/!]</code>.  "
"[!python|scala|java]<code>[!java|scala]true[/!][!python]True[/!]</code> and "
"<code>[!java|scala]false[/!][!python]False[/!]</code> are constant values "
"defined by [!thelang] directly, just as 0 or 1 in mathematics.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:64
msgid ""
"The condition can be a "
"<code>[!c]int[/!][!java]boolean[/!][!scala|python]Boolean[/!]</code> "
"variable (we will come back on variables in a later exercise, don't worry) "
"or an arithmetic test, such as <code>x == 5</code>, which checks whether the "
"current value of <code>x</code> is 5, or such as <b>!=</b> (checking "
"inequality, that is, returning "
"[!c]1[/!][!java|scala]true[/!][!python]True[/!] only if the left-hand side "
"is different from the right-hand side), <b>&lt;</b> (smaller than), "
"<b>&gt;</b> (larger than), <b>&lt;=</b> (smaller or equal to), <b>&gt;=</b> "
"(larger or equal to)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:71
msgid ""
"Beware of the classical trap, which consists in testing the equality of a "
"variable using = instead of ==. Hopefully, the "
"[!java|scala|c]compiler[/!][!python]interpreter[/!] detects this problem "
"most of the time, but it could get trapped is some cases (such as when you "
"are affecting a [!c]int[/!][!java|python|scala]boolean[/!] variable). So "
"you'd better to be careful..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:76
msgid ""
"The condition can also be a call to some particular methods returning a "
"boolean. For example, the <code>isFacingWall()</code> method of the buggle "
"returns [!c]1[/!][!java|python|scala]true[/!] if the buggle is facing a "
"wall, and [!c]0[/!][!java|python|scala]false[/!] in the other case."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:80
msgid ""
"Finally, a condition can be composed of several sub-conditions connected by "
"boolean operations:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/conditions/Conditions.html:83
msgid ""
"<code>cond1 [!java|scala|c]&&[/!][!python]and[/!] cond2</code> is true when "
"<tt>cond1</tt> <b>and</b> <tt>cond2</tt> are both true (if <tt>cond1</tt> is "
"false, <tt>cond2</tt> is not even evaluated as we already know that the "
"conjunction of both propositions cannot be true)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/conditions/Conditions.html:86
msgid ""
"<code>cond1 [!java|scala|c]||[/!][!python]or[/!] cond2</code> is true if "
"<tt>cond1</tt> <b>or</b> <tt>cond2</tt> is true (if <tt>cond1</tt> is true, "
"<tt>cond2</tt> is not even evaluated as we already know that the disjunction "
"of both propositions cannot be false)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/conditions/Conditions.html:89
msgid ""
"<code>[!java|scala|c]![/!][!python]not [/!]cond</code> is true if "
"<tt>cond</tt> is false."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/conditions/Conditions.html:90
msgid ""
"When the expression becomes complicated, it is better to add parenthesis to "
"force the order of evaluation.  Do not hesitate to add more parenthesis to "
"remove any ambiguities that may appear in an expression."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:94
msgid ""
"Last, it is possible to specify what to do when the condition is false using "
"the following syntax. In this case, the instruction "
"<code>whatToDoIfItsFalse</code> will be executed only if the condition is "
"false."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/conditions/Conditions.html:97
#, no-wrap
msgid ""
"[!java|scala|c]if (<b>condition</b>) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfTheConditionIsTrue();</b>\n"
"} else {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfItsFalse();</b>\n"
"}[/!][!python]if (<b>condition</b>):\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfTheConditionIsTrue()</b>\n"
"else:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>whatToDoIfItsFalse()</b>[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:106
msgid ""
"Don't forget the colon (:) after the else, it is indicating that a new block "
"is beginning."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/conditions/Conditions.html:109
msgid ""
"<a name=\"Objectives\"/> If the buggle is facing a wall, you must move one "
"step back. If not, you must move one step forward. To detect whether you are "
"facing a wall, simply use the <code>isFacingWall()</code> built-in, that "
"every buggle understands."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:116
msgid ""
"This exercise is a bit different: your code has to work for several buggles, "
"each of them being in a specific initial condition. The same code will be "
"executed for each of them."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/conditions/Conditions.html:120
msgid ""
"When your program works, move forward to the next exercise, that is hidden "
"in a sub-tree of the selection window."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/LoopWhile.html:4
msgid ""
"In addition to conditionals, another handy construction is the ability to "
"repeat an action while a specific condition does not appear. A while loop is "
"used for that, with the following syntax."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopwhile/LoopWhile.html:8
#, no-wrap
msgid ""
"[!java|scala|c]while (<b>condition</b>) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>action()</b>;\n"
"}[/!][!python]while <b>condition</b>:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>action()</b>[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/LoopWhile.html:13
msgid ""
"The inner bloc is then executed again and again, as long as the condition "
"remains true.  More specifically, the buggle tests the value of the "
"condition. If it's false, it ignores the bloc and continue below.  If it's "
"true, it executes the bloc.  After that, it tests the condition. If it's now "
"false (for example because the moves of the block made us facing the wall), "
"it now ignores the bloc and continue.  If it's still true, it execute the "
"bloc and reevaluate the condition. It does so as long as the condition "
"remains true."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/LoopWhile.html:20
msgid ""
"Naturally, if the chosen action does not modify the value of the condition, "
"the buggle will do the action endlessly. The <b>stop</b> button of the "
"interface becomes then handy. To test this, you can try to type the "
"following code in the editor:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopwhile/LoopWhile.html:25
#, no-wrap
msgid ""
"[!java|scala]while (true) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;left();\n"
"}[/!][!c]while (1) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;left();\n"
"}[/!][!python]while True:\n"
"&nbsp;&nbsp;&nbsp;&nbsp;left()[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/LoopWhile.html:32
msgid ""
"This will let the buggle turn left as long as "
"<code>[!c]1[/!][!java|scala]true[/!][!python]True[/!]</code> remains true "
"(ie, endlessly), or until you stop it manually using the stop button."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/loopwhile/LoopWhile.html:36
msgid ""
"You now have to write some code so that your buggles move forward until they "
"encounter a wall. The idea is thus to do something like:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopwhile/LoopWhile.html:39
#, no-wrap
msgid ""
"while we are not facing a wall, do:\n"
"&nbsp;&nbsp;moveForward()"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/LoopWhile.html:42
msgid ""
"Look at the documentation (in \"Help/About this world\") for the full list "
"of buggles' methods."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/BaggleSeeker.html:3
msgid ""
"The buggle world can sometimes contain some <i>baggles</i>, which are little "
"biscuits that buggles can carry from one point to another. For that, they "
"have to use specific methods such as <code>isOverBaggle(), "
"isCarryingBaggle(), pickupBaggle()</code> or "
"<code>dropBaggle()</code>. Check their documentation in \"Help/About this "
"world\" for more details."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopwhile/BaggleSeeker.html:11
msgid ""
"Let each buggle find its baggle by adapting the code you wrote in previous "
"exercise (copy/paste what you've done before if you want)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:3
msgid ""
"The programs we wrote so far are missing a fundamental point in computing.  "
"Actually, it is all about processing <b>data</b> through specific "
"<b>instructions</b>. In the buggle world, the main data are a bit hidden "
"behind the graphical representation, but that's no reason to never "
"manipulate some data explicitly."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/variables/Variables.html:9
msgid "Data in [!thelang]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:10
msgid ""
"In a program, you can use several <i>types</i> of data, such as integers or "
"strings of chars. If you want to use a data several times, you need to store "
"it within a <i>variable</i>, which is a memory cell containing a value: you "
"put your data (say the value '5') in the variable (say 'length'), and you "
"can retrieve it later when you need it. That's very similar to a box of "
"label 'gift' in which you would put some stuff, like a bottle of perfume "
"\"Channel N°5\"."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/variables/Variables.html:17
msgid "Variable declarations"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:19
msgid ""
"<b>Declaring</b> (ie, creating) a variable in [!thelang], is very "
"simple. You just need to write [!java]its type, a space, and the variable "
"name.[/!] [!scala]the <code>var</code> keyword, the variable name, a column "
"(:) and the variable type an equal sign (=) and an initial value.[/!] "
"[!python]the variable name, an equal sign (=) and an initial value.[/!] The "
"variable name is the label to retrieve it afterward[!python].[/!] "
"[!java|scala] while the type is the kind of data that this variable accepts "
"to store.[/!] It is forbidden to use spaces in variable names. You can name "
"a variable <code>stepAmount</code> if you want, but <code>step amount</code> "
"is not a valid name."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/variables/Variables.html:29
msgid "[!c|java]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:30
msgid ""
"So, to create a variable named <b>x</b> intended to contain integers, one "
"should write:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:31
#, no-wrap
msgid "int x;"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:32
msgid ""
"If you want, you can specify the initial value of the variable by adding an "
"equal sign (=) followed by the value after the declaration."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:34
#, no-wrap
msgid "int x=5;"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/variables/Variables.html:35 src/lessons/welcome/variables/Variables.html:69
msgid "[/!] [!python]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:38
msgid ""
"So, if you want that the variable contains 5 as initial value, you should "
"type:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:39
#, no-wrap
msgid "x = 5"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/variables/Variables.html:40 src/lessons/welcome/loopfor/LoopFor.html:68 src/lessons/welcome/bdr/BDR2.html:83 src/lessons/recursion/cons/universe/ConsWorld.html:34
msgid "[/!] [!scala]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:43
msgid ""
"So, to create a variable named <b>x</b> intended to contain integers with 42 "
"as initial value, one should write:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:44
#, no-wrap
msgid "var x:Int = 42"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:45
msgid ""
"In most cases, the compiler is able to guess the type of the variable from "
"the initialization value, and you can omit it:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:46
#, no-wrap
msgid "var x = 42"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:47
msgid ""
"You still have to specify if you use some generic values as an "
"initialization, such as the very particular value <code>null</code>, which "
"type happens to be ambiguous. Even when the type is clear, you can still "
"specify it if you prefer.  So you want that the variable contains 5 as "
"initial value, you should type:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:50
#, no-wrap
msgid ""
"var x: Int =  5 <span class=\"comment\">// I can define the type if I want "
"to</span>\n"
"var y =  10      <span class=\"comment\">// or I can omit the type if I "
"prefer</span>"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/variables/Variables.html:52 src/lessons/welcome/loopdowhile/LoopDoWhile.html:39
msgid "[/!] [!java|scala|c]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:55
msgid ""
"As you can see, the variables are <b>typed</b> in [!thelang], which means "
"that they are somehow specialized: A given variable can only store data of a "
"given type; Don't even think of storing numbers in a variable that is "
"tailored for letters! The [!thelang] language is said to be <b>statically "
"typed</b>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:58
msgid ""
"Other languages (such as Python) are less picky and allow you to store any "
"kind of data in any variable, without restriction (those languages are said "
"to be <b>dynamically typed</b>).  This seems easier at the first glance, but "
"this kind of restriction allows the compiler to catch more logic errors for "
"you, which is also good. In some sense, Python is easier to write but errors "
"can sneak in more easily than in [!thelang]."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:62
msgid "Here are some existing types in [!thelang]:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/variables/Variables.html:64
msgid "<b>[!java|c]int[/!][!scala]Int[/!]</b>, for integers;"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/variables/Variables.html:65
msgid "<b>[!java|c]double[/!][!scala]Double[/!]</b>, for dot numbers;"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/variables/Variables.html:66
msgid ""
"<b>[!c]int[/!][!java]boolean[/!][!scala]Boolean[/!]</b>, for booleans that "
"are values being either [!c]1[/!][!java|scala]true[/!] or "
"[!c]0[/!][!java|scala]false[/!];"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/variables/Variables.html:67
msgid "<b>[!c]char*[/!][!java|scala]String[/!]</b>, for char strings."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:72
msgid ""
"As you can see, the variables are not <b>typed</b> in Python, which means "
"that they are not specialized in any type of data.  A given variable store "
"any type of data of a given type: you can store a number in a variable and "
"later on store a number in the same variable.  The values themselves are "
"still typed, but not the variable. Python is said to be <b>dynamically "
"typed</b>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:75
msgid ""
"Other languages (such as Java, Scala or C) are much more picky and prevent "
"you to mix data types in a given variable (they are said to be <b>statically "
"typed</b>).  This seems annoying at the first glance, but this kind of "
"restriction allows the compiler to catch more logic errors for you, which is "
"also good. In some sense, Python is easier to write but errors can sneak in "
"more easily."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:81
msgid ""
"If you know that the value of your \"variable\" will never change (eg "
"because it contains the screen size or some other constant value), then you "
"should make it a <b>value</b> instead of a variable. Simply change the "
"<code>var</code> keyword with the <code>val</code> one. The compiler can "
"then check your actions and catch your error when you inadvertently modify "
"the value. More interestingly, the compiler can produce faster code in some "
"cases."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:86
msgid ""
"Variables work very similarly for strings, floating point numbers and "
"boolean values."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:88
#, no-wrap
msgid ""
"char* name = \"Martin Quinson\";\n"
"double height=1.77; <span class=\"comment\">// in meters</span>\n"
"int married=1;<span class=\"comment\">// 1 means \"true\"; \"false\" would "
"be written 0</span>"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:93
#, no-wrap
msgid ""
"String name = \"Martin Quinson\";\n"
"double height=1.77; <span class=\"comment\">// in meters</span>\n"
"boolean married=true;<span class=\"comment\">// the contrary would be "
"written \"false\"</span>"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:97
#, no-wrap
msgid ""
"val name:String = \"Martin Quinson\"; <span class=\"comment\">// this cannot "
"be modified (it's a value)</span>\n"
"var height: Double = 1.77; <span class=\"comment\">// in meters</span>\n"
"var married = true; <span class=\"comment\">// the contrary would be written "
"\"false\"</span>\n"
"<span class=\"comment\">// Scala knows that 'true' is a Boolean value, no "
"need to repeat it here</span>"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:102
#, no-wrap
msgid ""
"firstName = \"Martin\"\n"
"lastName = 'Quinson' <span class=\"comment\"># both single and double quote "
"work here</span>\n"
"motto = \"I never finish anyth' (but I keep trying)\" <span "
"class=\"comment\"># having single quote within double quote is fine</span> "
"\n"
"height=1.77 <span class=\"comment\"># in meters</span>\n"
"married=True <span class=\"comment\"># the contrary would be written "
"\"False\"</span>"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/variables/Variables.html:108
msgid "Affectations"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:110
msgid ""
"Once your variable is declared, you can <b>affect</b> a new value to it "
"later in the program. That's really easy:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:111
#, no-wrap
msgid "x = 3[!java|c];[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:113
msgid ""
"To the right of the equal symbol, you can put an arithmetic expression "
"containing constants, variables and operations."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/variables/Variables.html:115
#, no-wrap
msgid ""
"x = 3 + 2[!java|c];[/!]\n"
"x = 3 * x[!java|c];[/!]\n"
"[!java|scala|python]greeting = \"Hello \"+name[!java];[/!] <span "
"class=\"comment\">[!python]#[/!][!scala|java]//[/!] + is (also) the "
"operation to concatenate (ie, to join) strings[/!]</span>"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/variables/Variables.html:120
msgid ""
"It is now time to do more challenging exercises, don't you think? The "
"objective is now to move forward until you find a baggle, pick it up, and "
"then move back to your initial location before dropping the baggle."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/variables/Variables.html:125
msgid "How to do this?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:126
msgid ""
"To solve this problem, you have to decompose it in easier sub-parts. For "
"example, you may want to do the following steps:"
msgstr ""

#. type: Content of: <p><ol><li>
#: src/lessons/welcome/variables/Variables.html:129
msgid "Move forward until located over a baggle"
msgstr ""

#. type: Content of: <p><ol><li>
#: src/lessons/welcome/variables/Variables.html:130
msgid "Pickup the baggle"
msgstr ""

#. type: Content of: <p><ol><li>
#: src/lessons/welcome/variables/Variables.html:131
msgid "Move backward of the same amount of steps than done in first step"
msgstr ""

#. type: Content of: <p><ol><li>
#: src/lessons/welcome/variables/Variables.html:132
msgid "Drop back the baggle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:135
msgid ""
"Naturally, it is impossible to do the right amount of steps backward at step "
"3 if you didn't count the amount of steps done in the first phase. You can "
"use a variable for that, which can be named <code>stepAmount</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:139
msgid ""
"Create an integer variable before phase 1, initialize it to 0, and each time "
"you move one step forward, increment its value by one (<code>stepAmount = "
"stepAmount + 1;</code>[!java|c] or <code>stepAmount++;</code>, both syntaxes "
"being equivalent[/!]).  Such variable which takes every values of a given "
"range is often called a <b>stepper</b>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:146
msgid ""
"If you know Java or other languages, you will probably try to use the "
"<code>++</code> operator to increment the variable, but it's not allowed in "
"[!thelang].  This is because it would be difficult to define this operator "
"for every data types.  For example, what should ++ do when applied to a "
"Complex value or to a String? The problem does not occur in Java as "
"<code>int</code> is not an object but a primitive type.  (if you don't know "
"the <code>++</code>, just ignore this paragraph: it does not exist in "
"[!thelang])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:154
msgid ""
"Then, phase 3 consists in simply creating a new integer variable "
"<code>doneSteps</code> initialized to 0, and do one step backward as long as "
"<code>doneSteps</code> is not equal to <code>stepAmount</code>, incrementing "
"<code>doneSteps</code> each time. The <code>!=</code> operator should be "
"used to test the inequality (whether some values are NOT equal)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/Variables.html:161
msgid "It's your turn now!"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/variables/RunFour.html:2
msgid "Run Four bases"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/RunFour.html:4
msgid ""
"Today is a great day for the buggles: the Big Buggles' Race begun. It's a "
"traditional competition in which young buggles prove their value to the "
"tribe. Both force and intelligence is exercised: you have to rush forward, "
"but stop as soon as you reach your fourth baggle.  Please help the buggles "
"to move forward while counting the baggles and to determine when to stop."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/variables/RunHalf.html:2
msgid "The Four Halves run"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/RunHalf.html:4
msgid ""
"Here is the second day of the Big Buggles' Race.  As previously, you have to "
"run forward until you reach the right cell to stop on.  But this time, you "
"have to reach the cell where the amount of baggles you saw is the double of "
"the orange cells plus 1.  In other words, the following condition must "
"become true: <code>2 * baggles = orangeCells + 1</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/variables/RunHalf.html:10
msgid ""
"You can determine whether you are over a orange cell with the "
"<code>isOverOrange()</code> method."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:4
msgid ""
"While loops are well adapted to situations where you want to achieve an "
"action while a condition stays true, but it is less adapted to achieve a "
"given action a predetermined amount of time. For example, when we wanted to "
"move <code>stepAmount</code> steps backward in a previous exercise, we had "
"to create a new variable, initialize it, and move backward while "
"incrementing this variable until it became equal to <code>stepAmount</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:11
msgid ""
"In such situations, <code>for</code> loops become handy. Their syntax is the "
"following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:13
#, no-wrap
msgid ""
"[!java|c]for (<b>initializing</b>; <b>condition</b>; <b>incrementing</b>) "
"{\n"
"    <b>action</b>();\n"
"}[/!][!python]for <b>variable</b> in <b>sequence of values</b>:\n"
"    <b>action</b>()[/!][!scala] for (<b>variable</b> &lt;- <b>firstValue</b> "
"to <b>lastValue</b>) { \n"
"    <b>action</b>();\n"
"}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:20
msgid ""
"For example to repeat the loop body <code>n</code> times, [!python] it is "
"handy to use the instruction <code>range(n)</code> to generate the sequence "
"n integer value from 0 to n-1.[/!] [!java|scala|c] one should write:[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:23
#, no-wrap
msgid ""
"[!java]for (int stepper=0; stepper&lt;n; stepper++) {\n"
"    <b>action</b>();\n"
"}[/!][!c]int stepper;\n"
"for (stepper=0; stepper&lt;n; stepper++) {\n"
"    <b>action</b>();\n"
"}[/!][!python]for <b>stepper</b> in <b>range(n)</b>:\n"
"    <b>action</b>()[/!][!scala] for (<b>stepper</b> &lt;- <b>1</b> to "
"<b>n</b>) { \n"
"    <b>action</b>();\n"
"}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:33
msgid ""
"This code is then equivalent to the following one from the computer point of "
"view. From the programmer point of view, one form or the other can make the "
"source code easier to read, depending on the situation. You should chose "
"wisely in each situation whether you want to use a for loop or a while "
"loop. Your uttermost goal should remain to keep your code simple and easy to "
"read, to ensure that your day remain pleasant and productive."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:41
#, no-wrap
msgid ""
"[!java|c]int stepper = 0;\n"
"while (stepper &lt; n) {\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>action</b>();\n"
"&nbsp;&nbsp;&nbsp;&nbsp;<b>stepper++</b>;\n"
"}[/!][!python]stepper=0\n"
"while stepper &lt; n: \n"
"    action()\n"
"    stepper = stepper + 1[/!][!scala]\n"
"var stepper = 1\n"
"while (stepper &lt;= n) {\n"
"    <b>action</b>()\n"
"    stepper = stepper + 1\n"
"}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:55
msgid "In that case, the <code>for</code> loop is easier to read, don't you think?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:58
msgid ""
"It is possible to build more advanced <tt>for</tt> loops since any valid "
"instruction can be used as initialization, condition and incrementing "
"instruction. The following example is a bit extreme as there is no need for "
"a loop body to move the buggle forward until it reaches the wall, but it "
"works well: all the work is done in the condition and incrementing "
"instruction."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:64
#, no-wrap
msgid ""
"for (; !isFacingWall() ; forward()) { \n"
"   <span class=\"comment\">/* nothing in the loop body */</span>\n"
"}\n"
"<span class=\"comment\">/* the buggle now faces a wall */</span>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:71
msgid ""
"If you want to nest several loops, you can do it on one line in Scala. This "
"means that the two following chunks are equivalent:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:72
#, no-wrap
msgid ""
"for (stepper1 &lt;- 1 to n) {\n"
"    for (stepper2 &lt;- 1 to m) {\n"
"       actions()\n"
"    }\n"
"}"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopfor/LoopFor.html:77
#, no-wrap
msgid ""
"for (stepper1 &lt;- 1 to n; stepper2 &lt;- 1 to m) { <span "
"class=\"comment\">// Simply separate both loop conditions with a "
"semi-column</span>\n"
"    actions()\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:83
msgid ""
"You now have to redo the same exercise than previously (move forward until "
"being over a baggle, pick it up, move back to your original location, drop "
"the baggle), but using a <code>for</code> loop instead of a "
"<code>while</code> loop to move back to the initial location."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopFor.html:88
msgid "Once done, you can proceed to next exercise."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/loopfor/LoopStairs.html:2
msgid "Stairway to Heaven"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopStairs.html:4
msgid ""
"Your buggle feels a bit depressed today, but it's currently facing a magic "
"stair: It leads directly to heaven, and each time you walk on it, joyful "
"colors spur all around."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopStairs.html:7
msgid ""
"Your goal is to take this stair, one step after the other.  First devise the "
"four instructions you have to give you buggle to take one stair step, and "
"then put them in a loop to take the whole stair."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopStairs.html:11
msgid ""
"Before that, walk a bit forward to reach that stair, and ensure that you are "
"in the right situation for your loop content to run properly. And once you "
"reach the heaven, take some steps in your new home.  Meanwhile, you just "
"have to walk your way, the colors appear automagically."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/loopfor/LoopCourse.html:2
msgid "Training Buggle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopCourse.html:4
msgid ""
"Today, your buggle wants to get some serious exercise: It wants to run 'till "
"the track burns! Its super-shoes are just perfect to run like hell, but "
"unfortunately, they can actually damage the track on the long run..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopCourse.html:7
msgid ""
"Your goal is to run the track 10 times, no matter what happens.  Even if the "
"track suffers, you <b>really HAVE</b> to take that run.  Remember, the track "
"has four sides, that take eight steps each to run along.  Now go, and show "
"them what these super shoes can do."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopCourse.html:12
msgid ""
"You don't have to do anything particular with regard of the colors: your "
"shoes will do it for you. Just take that run!"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/loopfor/LoopCourseForest.html:2
msgid "Outdoor Training Buggle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopCourseForest.html:4
msgid ""
"Well, our last training didn't went that well. The track actually burned, "
"and we are now banned from there.  This time, our buggle decided to practice "
"outdoor, in the middle of the forest, with its good old shoes instead.  The "
"problem is that you have to be careful to not fall into water. The track on "
"which you can run is rather narrow: One side is now 4 steps forward, 2 steps "
"to the left, 4 steps to the right, 2 steps to the right, 4 steps to the "
"left, and you want to run 7 around."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopfor/LoopCourseForest.html:10
msgid ""
"Oh crap, running on the grass seems to destroy it too! So just take your 7 "
"loops around the garden, and move along to the next exercise before anyone "
"notices the damage you made..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:4
msgid ""
"Some cells of the world are yellow, but your buggle cannot stand being in "
"such cells. Write the necessary code to move forward until the ground gets "
"white. For that, use the provided method <code>isGroundWhite()</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:8
msgid ""
"The trick is that most buggles of this world are currently on this yellow "
"ground that they dislike so much. That is why they are in panic, and every "
"buggle rushes one cell forward, even the buggle that was not on a yellow "
"cell at first. In other worlds, even if the ground is white on the first "
"cell, you still want to move forward to the next cell."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:13
msgid "The general idea is to do something like:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:14
#, no-wrap
msgid "move forward until located in a white cell"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:16
msgid ""
"The main difficulty is that we want this loop body to be executed once, even "
"we are already on a white cell.  It would be easy to do so by duplicating "
"the loop content before the actual loop, but this would be a bad idea: code "
"duplication is a <b>very</b> bad habit, and you should <b>always</b> avoid "
"it."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:20
msgid ""
"Code duplication easily turns code maintenance into a nightmare: reading the "
"code becomes difficult as the reader must ensure that no slight difference "
"exist between the versions. Debugging the code becomes difficult, as bugs "
"have to be fixed in all versions. Actually, every modification of the code "
"becomes difficult. So, really, you should <b>always</b> strive to not "
"duplicate your code if you can avoid. And the good news is that you always "
"can..."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:25
msgid "Executing the loop body at least once"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:26 src/lessons/welcome/array/basics/Array1.html:100 src/lessons/turmites/helloturmite/HelloTurmite.html:54 src/lessons/maze/pledge/PledgeMaze.html:59
msgid "[!python]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:27
msgid ""
"Some languages have specific constructs for that, but not the Python "
"language. No problem, we can do it on our own! A good way is to have a "
"dedicated variable indicating whether we are taking the loop for the first "
"time or not, as follows."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:31
#, no-wrap
msgid ""
"firstTime = True\n"
"while firstTime or (other conditions):\n"
"  firstTime = False\n"
"  (loop body)\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:37
msgid ""
"When <code>firstTime</code> is true, the loop body is executed even if the "
"other conditions would imply the contrary.  Once the loop body has been "
"executed once, it is set to false and never impact again the decision to "
"enter the body or not."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:43
msgid ""
"In a <tt>while</tt> loop, the condition is evaluated before anything else, "
"and if it's false, the loop body is never evaluated. Sometimes (although not "
"that often), you would prefer the loop body to get evaluated at least once, "
"even if the condition is initially false. For that, a variation of the "
"<tt>while</tt> loop gets used, using the following syntax in [!thelang].  "
"[!java|c]Do not forget the semi-column (;) after the condition, it is "
"mandatory.[/!]"
msgstr ""

#. type: Content of: <p><pre>
#: src/lessons/welcome/loopdowhile/LoopDoWhile.html:51
#, no-wrap
msgid ""
"do {\n"
"    <b>action()</b>[!java];[/!]\n"
"} while (<b>condition</b>)[!java];[/!]"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/loopdowhile/Poucet1.html:2
msgid "Tracks of buggles"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:4
msgid ""
"Your buggle got lost in a strange maze, and you must help it to find the "
"exit that is represented in orange.  You cannot simply explain the path to "
"the exit in something like "
"<code>right();forward();forward();forward()</code> because you have to save "
"two buggles at the same time, that are lost in similar but not identical "
"worlds.  You can switch to the other world by using the combobox above the "
"world representation (where it's written 'Deep Forest' right now), and "
"selecting the other entry (that should read 'Deeper Forest')."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:10
msgid ""
"The good news is that the path to the exit is written on the ground. As you "
"can see, the world is made of several corridors, with baggles on the "
"ground. After each corridor, you should turn left if the corridor contains "
"three baggels or more, and you have to turn right if there is only 2 baggles "
"or less."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:14
msgid ""
"You should count exactly 5 cells per corridor, the one at the intersection "
"counting as the last cell of the previous corridor, not as the first cell "
"after your turn."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:17
msgid ""
"So, the general form of your code must be something like \"while I did not "
"find the exit, take the next corridor to decide whether I should turn left "
"or right at the next intersection\". You can determine whether you are on "
"the exit cell (that is orange) with the provided <code>exitReached()</code> "
"method."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:21
msgid ""
"To take one corridor, you simply have to run from one intersection to "
"another while counting the baggles you see on your path. That's easy: there "
"is 5 steps in each corridors so a simple <code>for</code> loop suffices."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/welcome/loopdowhile/Poucet1.html:25
msgid "I cannot imagine how to count the baggles I see."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/welcome/loopdowhile/Poucet1.html:26
msgid ""
"You need a variable that is initialized to 0, and incremented each time you "
"see a baggle on the ground. A variable used this way is often called "
"<i>counter</i>."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/welcome/loopdowhile/Poucet1.html:28
msgid "Don't forget to reset your counter to 0 at the beginning of each corridor!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/loopdowhile/Poucet1.html:31
msgid ""
"Oh, and when you reach the exit, don't forget to take an extra step to "
"actually exit the maze!"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/basics/Array1.html:2
msgid "[!java|scala]Arrays[/!][!python]Lists[/!] and Knotting"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/basics/Array1.html:4
msgid ""
"The goal of this exercise is to reproduce the pattern of the first row in "
"the other rows with a shift of one cell (see the Objective tab for "
"details). The biggest difference between this exercise and the others we had "
"on patterns is that you have to read the pattern (on first row) before "
"reproducing it. You cannot do otherwise because the same code will be "
"executed on three different worlds, each of them having a specific pattern."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:12
msgid ""
"One solution is to read the next cell, and go copy it in position before "
"coming back to read the second cell. But since it is forbidden to use the "
"methods to teleport the buggle to a specific position (<code>setPos()</code> "
"and similar), this approach will be a pain to implement."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:17
msgid ""
"The simplest is to store the sequence of colors that constitute the whole "
"pattern in an [!java|scala]<b>array</b>[/!][!python]<b>list</b>[/!].  But "
"before we can do so, we should learn a bit what "
"[!java|scala]arrays[/!][!python]lists[/!] are."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/array/basics/Array1.html:21
msgid "[!java|scala]Arrays[/!][!python]List[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:23
msgid ""
"[!java|scala]An array[/!][!python]A list[/!] is an ordered sequence of "
"variables that go together.  It is somehow similar to a shelve where each "
"level can store a separate value. Each variable of the sequence is "
"identified by its position, and can store a specific value. [!java|scala]All "
"cells of the array must store values of the same type because arrays are "
"homogeneous in [!thelang]. It is possible to trick this restriction by using "
"the datatype <code>[!java]Object[/!][!scala]Any[/!]</code> that can contain "
"[!java]almost[/!] any other datatype. [!java]Primitive types such as the "
"ones we saw so far (int, boolean, double, char, etc) cannot be stored in an "
"Object variable, but their objectified counter-part (Integer, Boolean, "
"Double, Char, Boolean, etc) can.[/!] It is however a good practice to make "
"the type of an array as specific as possible, i.e., if you plan to store "
"some integers in your array, make it an array of integers, not of "
"[!java]Object[/!][!scala]Any[/!].[/!] [!python]Lists can even mix values of "
"differing types, such as integer values in some cells and colors in other "
"cells.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:40
msgid ""
"T is the [!java|scala]array[/!][!python]list[/!]'s name, "
"[!java|python]T[0][/!][!scala]T(0)[/!] is the name of the first cell, "
"[!java|python]T[1][/!][!scala]T(1)[/!] the name of the second cell, "
"[!java|python]T[2][/!][!scala]T(2)[/!] the third one, etc. And yes, the "
"first cell is numbered [!java|python]T[0][/!][!scala]T(0)[/!] while the last "
"one of [!java|scala]an array[/!][!python]a list[/!] of size N is "
"[!java|python]T[N-1][/!][!scala]T(N-1)[/!]. It may seem funny to count "
"starting from 0 and not from 1 as usual, but some historical reasons make it "
"unavoidable here."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/array/basics/Array1.html:48
msgid "Basic usage"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:50
msgid ""
"We can use an integer variable <i>i</i> to access with "
"[!java|python]T[i][/!][!scala]T(i)[/!] to the cells: when the value of "
"<i>i</i> is 0, then [!java|python]T[i][/!][!scala]T(i)[/!] accesses "
"[!java|python]T[0][/!][!scala]T(0)[/!]; when the value of <i>i</i> is 10, "
"then [!java|python]T[i][/!][!scala]T(i)[/!] accesses "
"[!java|python]T[10][/!][!scala]T(10)[/!].  <i>i</i> is said to be the "
"<b>index</b> in T.  <code>[!java|python]T[i][/!][!scala]T(i)[/!]</code> can "
"be used just like any variable. We can set a new value:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:58
#, no-wrap
msgid "[!java|python]T[i][/!][!scala]T(i)[/!] = 78[!java];[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:60
msgid "We can retrieve and use its value:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:61
#, no-wrap
msgid "x = [!java|python]T[i][/!][!scala]T(i)[/!][!java];[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:63
msgid "We can test this value:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:64
#, no-wrap
msgid ""
"if ([!java|python]T[i][/!][!scala]T(i)[/!] > 0) "
"[!scala|java]{[/!][!python]:[/!]\n"
"    [!java|scala]//[/!][!python]#[/!] instructions...\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:68
msgid ""
"It is very easy to traverse the whole "
"[!scala|java]array[/!][!python]list[/!], for example to initialize each "
"cells."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:71
#, no-wrap
msgid ""
"[!java]for (int i = 0; i&lt;T.length; i++) {[/!][!python]for i in "
"range(len(T)):[/!][!scala]for (i &lt;- 0 to T.length-1) {[/!]\n"
"   [!java|python]T[i][/!][!scala]T(i)[/!] = 3[!java];[/!]\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:75
msgid ""
"[!java|scala]The notation <code>T.length</code> retrieves the length of the "
"array T,[/!] [!python]The function <code>len()</code> retrieves the length "
"of the list T,[/!] allowing to build a classical for loop easily.  "
"[!python]Actually, the <code>len()</code> function is much more generic and "
"can be used to retrieve the length of many objects.  Applied to strings for "
"example, it returns the amount of chars in this string.[/!] [!scala]Don't "
"forget to start at <code>0</code> and stop at <code>T.length-1</code> "
"instead of <code>1</code> to <code>T.length</code> however.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:83
msgid ""
"If you just want to iterate over the values of T without keeping track of "
"their index, you can simply write:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:84
#, no-wrap
msgid ""
"[!java]for (int i: T) {[/!][!scala]for (i &lt;- T) {[/!][!python]for i in "
"T:[/!]\n"
"  action()[!java];[/!]\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:87
msgid ""
"[!java]This construct is called an <i>extended loop</i> in Java. The "
"variable <i>i</i> takes all values of the set located to the right of the "
"colon (:), one after the other.[/!] [!python|scala]This is actually very "
"similar to the previous construct.  Simply, "
"<code>[!python]range(n)[/!][!scala]i to j[/!]</code> returns a set of "
"integers over which the for construct iterates.  Actually, [!thelang] offers "
"much more elegant ways to traverse [!python]lists[/!][!scala]arrays[/!] and "
"other data collections, but this should be the topic of a specific set of "
"exercises (that are still to be written in PLM).[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/array/basics/Array1.html:98
msgid "Declaring [!python]a list[/!][!java|scala]an array[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:101
msgid ""
"If you know beforehand the content of your list, you can affect these values "
"all together.  Just put them between square braces and separated by commas "
"as follows:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:104
#, no-wrap
msgid ""
"L = [1, 3, 5, 7, 9] \n"
"<span class=\"comment\"># L is now an array of 5 values, all of them being "
"integers</span>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:106
msgid ""
"Otherwise, you probably want to create an empty list and then append each "
"values separately to the list:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:108
#, no-wrap
msgid ""
"L2 = [] \n"
"<span class=\"comment\"># L2 is now an empty list</span>\n"
"L2.append(1)\n"
"L2.append(3)\n"
"L2.append(5)\n"
"L2.append(7)\n"
"L2.append(9) \n"
"<span class=\"comment\"># Its content is now the same as L previously</span>"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/basics/Array1.html:116 src/lessons/turmites/helloturmite/HelloTurmite.html:61
msgid "[/!] [!java|scala]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:119
msgid ""
"To declare a variable named <b>T</b> that can store an array of integers, "
"one should write:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:120
#, no-wrap
msgid "[!java]int[] T;[/!][!scala]var T:Array[Int][/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:122
msgid ""
"[!java]<code>int</code> means that the elements of the array are of type "
"integer; <code>[]</code> means that we are speaking of an array and "
"<code>T</code> is the name of the variable.  For historical reasons, this "
"can also be written as <code>int T[]</code> (with the [] after the variable "
"name), but this is less readable and should probably be avoided.[/!] "
"[!scala]The <code>[Int]</code> notation specializes the Array type (that is "
"generic), specifying that each cell of this array is an integer. An array of "
"booleans would simply by written <code>Array[Boolean]</code>.[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/array/basics/Array1.html:130
msgid "Allocating an array"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:132
msgid ""
"Declaring a variable <code>T</code> that stores an array only reserve the "
"<b>name</b> <code>T</code> for later use, but not the memory area to store "
"the cells. The array is not initialized yet: it does not have any "
"value. What would <code>[!java]T[4][/!][!scala]T(4)[/!]</code> mean if we "
"didn't say that the array is 5 cells long?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:137
msgid "First and foremost, we have to give a value to <code>T</code>:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:138
#, no-wrap
msgid "[!java]T = new int[10];[/!][!scala]var T = new Array[Int](10)[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:140
msgid ""
"<code>new</code> means that we want to create something, and "
"<code>[!java]int[10][/!][!scala]Array[Int](10)[/!]</code> means that it is "
"an array of 10 integer values.  In return, an array of 10 integer cells is "
"created in memory, and the <code>T</code> variable <b>references</b> this "
"array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:145
msgid ""
"The size of an array is fixed and cannot be changed after the creation of "
"the array. The size of a <code>T</code> array can be retrieve by consulting "
"the variable <code>T.length</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:149
msgid ""
"While allocating, you can specify the size with a variable: "
"<code>[!java]int[] T = new int[i];[/!][!scala]var T = new "
"Array[Int](i);[/!]</code> In this case, the array's size will be set to the "
"value of <code>i</code> <i>when <code>new</code> gets called</i>.  The size "
"of the array still cannot be modified: even if the variable <code>i</code> "
"changes afterward, the size remains to the value given when it was "
"allocated.  [!java]Also, it is forbidden to write something like <code>int "
"T[10];</code> when declaring the variable.  You are required to use the "
"<code>new</code> instruction to allocate it, as in <code>int[] T = new "
"int[10];</code> [/!]"
msgstr ""

#. type: Content of: <h4>
#: src/lessons/welcome/array/basics/Array1.html:157
msgid "Declaration and initialization"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:158
msgid ""
"If you know beforehand the content of your array, you can declare, allocate "
"and initialize it in one shoot:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:159
#, no-wrap
msgid ""
"[!java]int[] T = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };[/!][!scala]var T = "
"Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:161
msgid ""
"To know the size of the array to allocate, the compiler counts the provided "
"values.  This code is equivalent to:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:163
#, no-wrap
msgid ""
"[!java]int[] T = new int[10];\n"
"T[0] = 1;\n"
"T[1] = 2;\n"
"...\n"
"T[9] = 10;[/!][!scala]var T = new Array[Int](10);\n"
"T(0) = 1\n"
"T(1) = 2\n"
"...\n"
"T(9) = 10[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:173
msgid "It is also equivalent to:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:174
#, no-wrap
msgid ""
"[!java]int[] T = new int[10];\n"
"for (int i=0; i&lt;T.length; i++) {\n"
"  T[i] = i+1;\n"
"}[/!][!scala]var T = new Array[Int](10);\n"
"for (i &lt;- 0 to T.length-1) {\n"
"  T(i) = i+1\n"
"}[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/array/basics/Array1.html:185
msgid "[!python]Lists[/!][!scala|java]Arrays[/!] and method parameters"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:186
msgid ""
"It is perfectly OK to pass [!python]a list[/!][!java|scala]an array[/!] to a "
"method as a parameter.  This method can then use this parameter as if it "
"were defined locally:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:188
#, no-wrap
msgid ""
"[!java]boolean has42First(int[] array) {\n"
"    return array[0] == 42;\n"
"}[/!][!python]def has42First(list):\n"
"  return list[0] == 42[/!][!scala]def has42First(array:Array[Int]):Boolean = "
"{\n"
"  return array(0) == 42\n"
"}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:195
msgid "On the caller side, that also very simple:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:196
#, no-wrap
msgid ""
"[!java]int[] tab = new int[10];[/!][!scala]var tab = new Array[Int] "
"(10)[/!][!python]tab = [1, 3, 5, 7, 9][/!]\n"
"[!java|scala]<span class=\"comment\">// Values initialization "
"omitted</span>\n"
"[/!]if (has42First(tab))[!java|scala] {[/!][!python]:[/!]\n"
"   <span class=\"comment\">[!java|scala]//[/!][!python]#[/!] do "
"something</span>\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/basics/Array1.html:202 src/lessons/turmites/langton/Langton.html:21
msgid "[!java]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:203
msgid ""
"If you want to allocate and initialize the array in one shoot, that's a bit "
"more complicated as the compiler has to know the type of the parameter you "
"are creating.  For that, use the following (ugly) construct:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:206
#, no-wrap
msgid ""
"if (has42First(   new int[] {1, 3, 5, 7, 9}   ) {\n"
"   <span class=\"comment\">// do something</span>\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:211
msgid ""
"Methods can also return [!java|scala]arrays[/!][!python]lists[/!] as result "
"without any complication.  Here is a method that returns [!java|scala]an "
"array[/!][!python]a list[/!] of the requested size, filled with 42s."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array1.html:214
#, no-wrap
msgid ""
"[!java]int[] fill42(int size) {\n"
"    int[] res = new int[size];\n"
"    for (int i=0; i&lt;size; i++) \n"
"        res[i] = 42;\n"
"    return res;\n"
"}[/!][!scala]def fill42(size:Int):Array[Int] = {\n"
"    var res = new Array[int] (size)\n"
"    for (i &lt;- 0 to size -1) {\n"
"        res(i) = 42;\n"
"    }\n"
"    return res;\n"
"}[/!][!python]def fill42(size):\n"
"    res = []\n"
"    for i in range(size):\n"
"        res.append(42)\n"
"    return res[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/array/basics/Array1.html:231 src/lessons/recursion/lego/square/FourSquare.html:48 src/lessons/recursion/hanoi/HanoiBoard.html:21
msgid "Goal of this exercise"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:233
msgid "At least! After this long explanation, we can come back to the exercise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:234
msgid ""
"Your mission is rather simple actually.  Your code should save the color "
"pattern observed on the first row into [!java|scala]an array[/!][!python]a "
"list[/!].  [!python]The easiest is to create an empty list, and then "
"<code>append()</code> the colors one after the others as you read them (with "
"<code>getGroundColor()</code>).[/!] [!java|scala]For that, you should "
"declare and allocate an array of <code>Color</code>. Beware, there is "
"several worlds, of differing size; use <code>getWorldHeight()</code> to "
"retrieve the size of the current world.  Once the array allocated, fill it "
"by reading the ground color in each locations (with "
"<code>getGroundColor()</code>).[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array1.html:242
msgid ""
"Once you managed to read and save the pattern on the first row, you have to "
"reapply the pattern on every rows, for example by executing "
"<code>getWorldHeight()</code> times a method written specifically for this."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/basics/Array2.html:2
msgid "[!java|scala]Arrays[/!][!python]Lists[/!], Knotting and Modulos"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:4
msgid ""
"This exercise is similar to the previous one: you have to reproduce the "
"color pattern of the first cell into the other ones."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:7
msgid ""
"The first difference is that the world is bordered of walls: you thus have "
"to slightly modify your trajectory to ensure that the buggle does not crash "
"into a wall. The simpler for that is to handle the first cell out of the "
"<code>for</code> loop and do only <code>getWorldHeight()-1</code> steps in "
"the loop."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:13
msgid ""
"The other difference is that the offset to apply between columns is not "
"fixed, but written on the first cell of each column. To get the info as an "
"integer, we can use:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/basics/Array2.html:17
#, no-wrap
msgid ""
"[!java]int offset = Integer.parseInt(readMessage())[/!][!python]offset = "
"int( readMessage() )[/!][!scala]val offset = readMessage().toInt[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:19
msgid ""
"<code>readMessage()</code> gets the message on the ground as a "
"[!java|scala]String[/!][!python]string[/!], while "
"<code>[!java]Integer.parseInt(str)[/!][!scala]str.toInt[/!][!python]int(str)[/!]</code> "
"transforms the string <code>str</code> into an integer by <i>reading</i> it."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:23
msgid ""
"Then, to pick the right color, the easier is to use the <code>%</code> "
"(modulo) operator. For example, <code>(i + 5) % size</code> allows to "
"retrieve the <code>i</code>th cell of an array of size <code>size</code> "
"with an offset of <code>5</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/basics/Array2.html:28
msgid "You're up."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/IndexOfValue.html:2
msgid "Searching for a given value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:4
msgid ""
"The goal of this exercise is to search the cell of a given value, and return "
"its position."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:6
msgid ""
"To that extend, you should fill the method <code>indexOf()</code>, which "
"parameters are the array to explore, and the value to search. If the value "
"<code>lookingFor</code> is not in the array <code>tab</code>, the method "
"should return -1."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:10
msgid ""
"The idea of the algorithm is to sweep over the whole array, checking the "
"value of each cell. If it's the searched value, you should return the index "
"of the cell currently checked."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:14
msgid ""
"Remember that indices begin at 0 and not at 1. So, if there is 3 cells, "
"their indices will be 0, 1 and 2. There would not be any cell numbered 3."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:17
msgid ""
"Remember also that the amount of cells in an array can be retrieved using "
"the <code>length</code> attribute. So, if your array is called "
"<code>tab</code>, its size can be retrieved as <code>tab.length</code>.  "
"Note that there is no () after <code>length</code>. An attribute is a sort "
"of variable embedded in another object (here, the array)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:22
msgid "So, the last value of an array is given by <code>tab[tab.length - 1]</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:24
msgid ""
"Remember also that the amount of cells in an array can be retrieved with the "
"<code>len()</code> function. So, if your array is called <code>tab</code>, "
"its size can be retrieved as <code>len(tab)</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfValue.html:28
msgid "So, the last value of an array is given by <code>tab[ len(tab) - 1]</code>."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/IndexOfMaxValue.html:2
msgid "Index of the maximum value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfMaxValue.html:4
msgid ""
"In this exercise, you must compute the index of the tab cell containing the "
"biggest value."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfMaxValue.html:6
msgid ""
"For that, fill the <code>indexOfMaximum()</code> method. Its parameter is "
"the array to explore. Should the array contain the searched value several "
"times, you should return the index of the first occurrence."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/IndexOfMaxValue.html:10
msgid ""
"To solve this exercise, you should sweep over the whole array. For each "
"value, if it's bigger than the biggest value you saw so far, you must save "
"this new champion and its position.  You will thus need 2 extra variables; "
"the initial value of the champion could be the value of the first cell."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/AverageValue.html:2
msgid "Average value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/AverageValue.html:5
msgid ""
"The objective of this exercise is to compute the average value of the "
"integer values stored in an array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/AverageValue.html:7
msgid ""
"You have to fill the body of the method <code>average()</code> which takes "
"as parameter the array of integers of which it computes and returns the "
"average value. Please note that this method must return an integer."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/AverageValue.html:9
msgid ""
"To compute the average value of an integer, it is necessary to traverse the "
"whole array and to compute the sum of all its values (so you will need a "
"variable to store this temporary result), then you have to divide this sum "
"by the size of the array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/AverageValue.html:11
msgid ""
"In Java, you can get the size of an array <code>myarray</code> by consulting "
"its <code>length</code> attribute (in other words, "
"<code>myarray.length</code>). Notice that there is no parenthesis after "
"<code>length</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/AverageValue.html:16
msgid ""
"In python, retrieving the size of an array <code>myarray</code> is as easy "
"as calling <code>len(myarray)</code>."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/MaxValue.html:2
msgid "Maximal value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/MaxValue.html:4
msgid ""
"In this exercise, you must compute the maximal value contained in an array.  "
"For that, fill the <code>maximum()</code> method, which parameter is the "
"array to explore."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/MaxValue.html:8
msgid ""
"To compute this value, sweep over the whole parameter. For each value, if "
"it's bigger than the biggest value you saw so far, you must save this value "
"somewhere to remember it afterward. You thus need an extra variable, which "
"can be initialized to the value of the first array cell."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/OccurrenceOfValue.html:2
msgid "Occurrence of a value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/OccurrenceOfValue.html:4
msgid ""
"In this exercise, you must compute the amount of occurrences of a given "
"value in an array (that is, the amount of time that this value appears in "
"the array). For that, fill the <code>occurrences()</code> method, which "
"returns the number of occurrence of <code>lookingFor</code> in "
"<code>tab</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/OccurrenceOfValue.html:9
msgid ""
"To compute this value, simply sweep over the array counting for the amount "
"of cells containing the searched value. You thus need an extra variable for "
"that."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/Extrema.html:2
msgid "Maxima and Minima"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/search/Extrema.html:4
msgid ""
"In this exercise, you must return the difference between the maxima (i.e., "
"the largest value of the array) and the minima (i.e., its smallest "
"value). The returned value is then a positive number.  Beware, you can only "
"do one traversal of the array to gather all informations that you need."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/search/SecondMaxValue.html:2
msgid "Second Biggest Value"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/SecondMaxValue.html:4
msgid ""
"In this exercise, you must compute the second maximal value contained in an "
"array, i.e. the value that becomes the maximum if you remove every instance "
"of the current maximum from the array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/search/SecondMaxValue.html:7
msgid ""
"As usual, you should gather the information in only one traversal of the "
"array.  You can assume that the second biggest value actual exists (there is "
"at least two distinct values in the array), and that all values in the array "
"are greater than [!python] -100000000.[/!] "
"[!java|scala]<code>Integer.MIN_VALUE</code> (which is the smallest "
"representable integer existing in [!thelang]).[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/array123/Array123.html:2
msgid "Array123"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/array123/Array123.html:3
msgid ""
"Given an array of integers, return true if .. 1, 2, 3, .. appears in the "
"array somewhere."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/array123/Array123.html:5 src/lessons/welcome/array/array667/Array667.html:8 src/lessons/welcome/array/arraycount9/ArrayCount9.html:5 src/lessons/welcome/array/arrayfront9/ArrayFront9.html:5 src/lessons/welcome/array/notriples/NoTriples.html:8 src/lessons/welcome/array/has271/Has271.html:10 src/lessons/welcome/bat/bool1/Close10.html:8 src/lessons/welcome/bat/bool1/Diff21.html:6 src/lessons/welcome/bat/bool1/HasTeen.html:7 src/lessons/welcome/bat/bool1/IcyHot.html:6 src/lessons/welcome/bat/bool1/In1020.html:6 src/lessons/welcome/bat/bool1/In3050.html:6 src/lessons/welcome/bat/bool1/LoneTeen.html:7 src/lessons/welcome/bat/bool1/Main.html:12 src/lessons/welcome/bat/bool1/Makes10.html:6 src/lessons/welcome/bat/bool1/Max1020.html:8 src/lessons/welcome/bat/bool1/MonkeyTrouble.html:8 src/lessons/welcome/bat/bool1/NearHundred.html:8 src/lessons/welcome/bat/bool1/ParotTrouble.html:9 src/lessons/welcome/bat/bool1/PosNeg.html:6 src/lessons/welcome/bat/bool1/SleepIn.html:8 src/lessons/welcome/bat/bool1/SumDouble.html:6 src/lessons/welcome/bat/bool2/AlarmClock.html:12 src/lessons/welcome/bat/bool2/AnswerCell.html:9 src/lessons/welcome/bat/bool2/BlueTicket.html:11 src/lessons/welcome/bat/bool2/CaughtSpeeding.html:12 src/lessons/welcome/bat/bool2/CigarParty.html:10 src/lessons/welcome/bat/bool2/DateFashion.html:13 src/lessons/welcome/bat/bool2/GreenTicket.html:10 src/lessons/welcome/bat/bool2/In1To10.html:9 src/lessons/welcome/bat/bool2/InOrderEqual.html:10 src/lessons/welcome/bat/bool2/InOrder.html:9 src/lessons/welcome/bat/bool2/LastDigit2.html:9 src/lessons/welcome/bat/bool2/LessBy10.html:6 src/lessons/welcome/bat/bool2/Main.html:7 src/lessons/welcome/bat/bool2/MaxMod5.html:10 src/lessons/welcome/bat/bool2/NearTen.html:9 src/lessons/welcome/bat/bool2/RedTicket.html:10 src/lessons/welcome/bat/bool2/SortaSum.html:8 src/lessons/welcome/bat/bool2/SquirrelPlay.html:11 src/lessons/welcome/bat/bool2/TeaParty.html:12 src/lessons/welcome/bat/bool2/TeenSum.html:9 src/lessons/welcome/bat/bool2/TwoAsOne.html:6 src/lessons/welcome/bat/bool2/WithoutDoubles.html:9 src/lessons/bat/string1/Main.html:10 src/lessons/bat/string1/AltPairs.html:5 src/lessons/bat/string1/FrontTimes.html:8 src/lessons/bat/string1/Last2.html:9 src/lessons/bat/string1/StringBits.html:5 src/lessons/bat/string1/StringMatch.html:9 src/lessons/bat/string1/StringSplosion.html:5 src/lessons/bat/string1/StringTimes.html:5 src/lessons/bat/string1/StringX.html:7 src/lessons/bat/string1/StringYak.html:8
msgid ""
"This exercise was converted to PLM from the excellent exercising site "
"http://codingbat.com/"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/array667/Array667.html:2
msgid "Array667"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/array667/Array667.html:3
msgid ""
"Given an array of integers, return the number of times that two 6's are next "
"to each other in the array. Also count instances where the second \"6\" is "
"actually a 7."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/arraycount9/ArrayCount9.html:2
msgid "ArrayCount9"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/arraycount9/ArrayCount9.html:3
msgid "Given an array of integers, return the number of 9's in the array."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/arrayfront9/ArrayFront9.html:2
msgid "ArrayFront9"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/arrayfront9/ArrayFront9.html:3
msgid ""
"Given an array of integers, return true if one of the first 4 elements in "
"the array is a 9. The array length may be less than 4."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/notriples/NoTriples.html:2
msgid "NoTriples"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/notriples/NoTriples.html:3
msgid ""
"Given an array of integers, we'll say that a triple is a value appearing 3 "
"times in a row in the array. Return true if the array does not contain any "
"triples."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/has271/Has271.html:2
msgid "Has271"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/has271/Has271.html:3
msgid ""
"Given an array of integers, return true if it contains a 2, 7, 1 pattern -- "
"a value, followed by the value plus 5, followed by the initial value minus "
"1.  So, 2,7,1 is such a pattern because 7 is 5+2 and 1 is 2-1. 3,8,2 is also "
"such a pattern."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/has271/Has271.html:7
msgid ""
"Additionally the 271 counts even if the \"1\" differs by 2 or less from the "
"correct value."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/golomb/Golomb.html:2
msgid "Golomb sequence"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/golomb/Golomb.html:4
msgid ""
"The Golomb sequence is a non-decreasing integer sequence where a(n) is the "
"number of times that n occurs in the sequence, with a(1) = 1."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/golomb/Golomb.html:7
msgid ""
"Since a(1)=1, it means that 1 occurs only once in the sequence, so a(2) must "
"be different. Since the sequence is non-decreasing, a(2)  must be greater "
"than 1. Since a(2)>1, the digit 2 must appear more than one time in the "
"sequence. So a(2)=2."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/golomb/Golomb.html:12
msgid ""
"Since a(2)=2, there is two 2 in the sequence, so we know the value of "
"a(3). And so on for the other values of the sequence."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/golomb/Golomb.html:15
msgid "Write a function that computes the Nth element of the sequence."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/array/island/Island.html:2
msgid "Buggles' Island"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/array/island/Island.html:4
msgid ""
"You just received the traveling notes of your old aunt who traveled accross "
"the country of the Buggles' Islands. She wrote down the altitude every "
"kilometer during her trip, resulting in a sequence of numbers as follows."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/island/Island.html:9
#, no-wrap
msgid "0 0 1 1 2 2 1 1 0 1 2 2 1 1 0"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/island/Island.html:11
msgid "Here is a cut of the islands on that path:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/island/Island.html:14
#, no-wrap
msgid ""
"       /***\\       /*\\         &lt;-- 2 meters above the see level\n"
"   /***********\\ /*******\\     &lt;-- 1 meter above the see level\n"
"***************************    &lt;-- see level\n"
"| | | | | | | | | | | | | |\n"
"0 0 1 1 2 2 1 1 0 1 2 1 1 0    &lt;-- altitude on each point\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/island/Island.html:21
msgid "This example is constituted of four levels of island:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/array/island/Island.html:24
msgid "1 1 2 2 1 1 (the island on the left)"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/array/island/Island.html:25
msgid "2 2 (the mountain topping the left island)"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/array/island/Island.html:26
msgid "1 2 1 1 (the right island)"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/array/island/Island.html:27
msgid "2 (the mountain on the right)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/island/Island.html:30
msgid "This can also be visualized this way:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/array/island/Island.html:32
#, no-wrap
msgid "0 0(1 1(2 2)1 1)0(1(2)1 1)0"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/array/island/Island.html:34
msgid ""
"Could you write a little program to compute the amount of levels in a given "
"sequence of altitudes? Actually, there is an iterative and a recursive "
"solution to that problem."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:5
msgid ""
"We will now write our own methods. It somehow comes down to extending the "
"buggle vocabulary by teaching it new tricks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:8
msgid ""
"For example, we saw in a previous exercise how to ask the buggle to go get "
"the baggle in front of it, and bring it back. If there is several baggles on "
"the board, and if we want to bring all of them on the bottom line, you have "
"to repeat this code several times, or include it in a loop. In any case, you "
"should avoid to duplicate your code to keep it pleasant to read and easily "
"understandable.  It would be better if the buggle could obey an "
"<code>goAndGet()</code> order just like it understands a "
"<code>[!c]stepForward()[/!][!scala|java|python]forward()[/!]</code> one."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/methods/basics/Methods.html:16
msgid "Defining methods"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:18
msgid ""
"The [!thelang] syntax to write a simple method called <code>goAndGet</code> "
"is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/basics/Methods.html:20
#, no-wrap
msgid ""
"[!java|c]void goAndGet() {[/!][!python]def goAndGet():[/!][!scala]def "
"goAndGet() {[/!]\n"
"  actions()[!java|c];[/!]\n"
"  to()[!java|c];[/!]\n"
"  do()[!java|c];[/!]\n"
"[!java|scala|c]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:26
msgid ""
"The method body [!java|scala|c](between curly braces)[/!][!python](the "
"indented block)[/!] will be executed when we call the method later on (that "
"is, when we write <code>goAndGet()</code> somewhere in our code). This "
"method body can contain as many instructions as you want, and any "
"construction we saw so far (for, while, if, etc).  [!java|c]The "
"<code>void</code> keyword means that this method does not return any "
"result. For example, the <code>isOverBaggle()</code> method does return a "
"result, which is a [!c]int[/!][!java]boolean[/!] indicating whether or not "
"the buggle is located over a baggle. We will soon learn to define such "
"methods too. For now, just write <code>void</code> at this location.[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/methods/basics/Methods.html:39
msgid "Documenting methods"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:41
msgid ""
"You should strive to document your code to keep it readable. When you write "
"it, its purpose and limitations are clear to you, but most of the time, this "
"does not last for long. You will soon forget about the details of every "
"specific method, and this day you will be happy to read its "
"documentation. In the following example, we use the specific formalism of "
"[!java]javadoc[/!][!scala]scaladoc[/!][!python]pydoc[/!], a program that "
"extracts the documentation of [!thelang] source code to produce html "
"pages. The main advantage is that it allows to keep the documentation near "
"to the code.  So, when you change your code, you have less chances to forget "
"to update the documentation."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:50
msgid ""
"[!java|scala][!java]javadoc[/!][!scala]scaladoc[/!] comments begin with the "
"<code>/**</code> marker (with two asterisks). They must be placed right "
"before the method they document for the tool to find them.[/!] "
"[!python]pydoc comments should be placed at the beginning of the method body "
"so that the tool finds them. They should be placed between "
"<code>\"\"\"</code>, which mark multi-line strings in python.[/!] The first "
"line should be a brief description of what this method does while any "
"subsequent lines should provide any important details about the method."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/basics/Methods.html:59
#, no-wrap
msgid ""
"[!java|scala]/**\n"
" *  Go, retrieves the baggle in front of the buggle, and brings it back \n"
" *\n"
" *   Does not check for walls, so be careful to not call it when walls are "
"present.\n"
" */[/!]\n"
"[!java]void goAndGet() {[/!]\n"
"[!scala]def goAndGet() {[/!]\n"
"[!python]def goAndGet():\n"
"  \"\"\"Go, retrieves the baggle in front of the buggle, and brings it "
"back.\n"
"\n"
"  Does not check for walls, so be careful to not call it when walls are "
"present.\"\"\"[/!]\n"
"  actions()[!java];[/!]\n"
"  to()[!java];[/!]\n"
"  do()[!java];[/!]\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/methods/basics/Methods.html:75
msgid "Naming conventions"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:76
msgid ""
"Most programming language forbid the use of spaces in method and variable "
"identifiers (=their names).  Accented letters are sometimes allowed (as in "
"[!thelang]), but they can lead to portability issues between operating "
"systems and should thus be avoided when possible."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:80
msgid ""
"Across all programming languages, there is two main conventions to name "
"variables and methods. The first one, consists in concatenating all words "
"with only the first letter of each word in upper case. \"go and get\" "
"becomes goAndGet().  It is called CamelCase because identifiers written this "
"way graphically remind of a camel back. The other convention, called "
"snake_case, is to write every words in lower case, separated with "
"underscores symbols (_). \"go and get\" becomes go_and_get()."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:87
msgid ""
"Which convention to use is the topic of heated discussion across developers, "
"but each programming language has its own habits. In Python, Perl and the C "
"language, the snake_case is often used for methods and variables. Java and "
"Scala prefer the lowerCamelCase (the very first letter is lower case) for "
"that."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:91
msgid ""
"The CamelCase convention is used everywhere in PLM because this program is "
"written in Java itself, so we kept our habits when adding new languages. But "
"the fact that the Python bindings of PLM use the CamelCase instead of the "
"snake_case is considered as a bug that we will fix in further releases."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:97
msgid ""
"The goal of this exercise is to write a method called "
"<code>goAndGet()</code> which does the same than in a previous exercises "
"(move forward until over a baggle, pick it up, move back to initial "
"position, drop baggle)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:101
msgid ""
"This exercise is a bit different because you will not write all of the code "
"executed by the buggle. Instead, you should only write one method that get "
"called automagically added when you click on <b>Start</b>. Your buggle calls "
"your <code>goAndGet()</code> method on each row, until the baggle is "
"found. [!python|scala]The code for that is already provided under the "
"<code>goAndGet()</code> method, but you probably don't want to change "
"it.[/!] [!java]You don't need to write the code calling "
"<code>goAndGet()</code> yourself. It's automagically there already, even if "
"you cannot see it.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/Methods.html:110
msgid ""
"But for that to work, you have to actually write this "
"<code>goAndGet()</code> method now."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:4
msgid ""
"We now would like to teach the buggle to build a doghouse. The naive "
"approach consists in directly writing the needed code as follows.  This "
"works because the buggle of this exercise leaves a red path as it moves."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:8
#, no-wrap
msgid ""
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"left()[!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"left()[!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"left()[!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"[!c]stepForward()[/!][!python|java|scala]forward()[/!][!java|c];[/!]\n"
"left()[!java|c];[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:21
msgid ""
"It becomes harder when we want to draw two doghouses: we have to rewrite the "
"same code twice, which is not really handy. When the code becomes a bit long "
"as this one, it becomes easier to see why we insist since a while on the "
"pure evilness that code duplication represents. Indeed, if you realize that "
"an error sneaked into a code that you copied at several locations, you will "
"have to fix it several times. And mind your back if you forget one of these "
"locations."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:27
msgid ""
"There is even a name to this good principle in programming: DRY/SPOT, which "
"means \"Don't Repeat Yourself / Single Point Of Truth\". The latter part "
"means that each information must be written in only one location of your "
"program to avoid the differing locations to get out of synch when you modify "
"your code."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:32
msgid ""
"So, let's apply this good principle and <b>factorize our code</b>, ie to "
"write it only once, for example in a method. You should even to go further "
"by factorizing the method body with a <code>for</code> loop, as seen "
"previously.  If you do it correctly (what you should), you can use the "
"method <code>left()</code> only once."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/basics/MethodsDogHouse.html:39
msgid ""
"The goal of this exercise is to write a method called <code>dogHouse</code> "
"achieving the same result than the code above, but with a for loop to keep "
"it short.  The buggle will call your creation to create several dog houses "
"around its world."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/picture/PictureMono1.html:4 src/lessons/welcome/methods/picture/MethodsPicture.html:4
msgid ""
"In this exercise, we will reproduce the geometric drawing that you can see "
"in the \"Objective\" tab."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono1.html:7 src/lessons/welcome/methods/picture/MethodsPicture.html:7
msgid ""
"Your goal (here and in any well written program) is to write the simplest "
"possible code. For that, you have to decompose your work in sub-steps, and "
"write a specific method for each sub-step."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono1.html:11
msgid ""
"If you observe carefully the picture to draw, it is constituted of four "
"parts depicting a sort of V. A possible decomposition is to write a method "
"in charge of drawing a V from the current position. Its prototype can be: "
"<code>[!java|c]void [/!]makeV()</code>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono1.html:16
msgid ""
"In this method, you should use the methods <code>brushUp()</code> and "
"<code>brushDown()</code> to mark the ground (you may want to factorize this "
"in another method). It may be wise to write the <code>makeV()</code> so that "
"it places directly the buggle in position for the next V."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono1.html:21
msgid ""
"Your turn. Your code should not be longer than 4 lines (not counting "
"<code>makeV</code>)..."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/picture/PictureMono2.html:4
msgid ""
"We will now reproduce an even bigger geometrical drawing. Once again, you "
"can see the model by clicking on the \"Objective\" tab."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono2.html:7
msgid ""
"You can naturally reuse all the code you typed in previous exercise (select "
"the other exercise, do Ctrl-C, come back to the code of this exercise, do "
"Ctrl-V)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono2.html:11
msgid ""
"But you want to keep your code as simple as possible. For that, define new "
"methods to deal simply with the repetitions in the pattern. For example, a "
"method <code>makePattern()</code> achieving the pattern of previous example "
"seems to be a good idea (but this may not be enough)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono2.html:16
msgid ""
"Why don't you give it a shot? The main code method shouldn't take more than "
"2 lines (included in a for loop)"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/picture/PictureMono3.html:4 src/lessons/welcome/methods/picture/MethodsPictureLarge.html:4
msgid ""
"As you can imagine, you have to reproduce the geometric drawing depicted in "
"the \"Objectives\" tab. As you can see, it is even bigger than the previous "
"one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PictureMono3.html:8
msgid ""
"You thus have to declare even more methods to use the repetitions of the "
"pattern and factorize your code.  Your turn..."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:2 src/lessons/lightbot/Board06Func.html:2
msgid "Functions"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:4
msgid ""
"Quite often, you want to write a method that compute some value and returns "
"it. Methods returning results are called <b>functions</b>.  Writing a "
"function is not really harder than writing a simple method.  [!java|c]You "
"simply have to specify the data type of expected results before the function "
"name (where we previously had <code>void</code>).[/!] [!scala]You simply "
"have to add a colon (:) after the parenthesis and write the type of data "
"that your function will return, and add an equal sign (=). This syntax is "
"actually rather close to defining a variable, with its type, that is "
"actually a function.[/!] You can use the <code>return</code> instruction "
"anywhere in your function body to specify that the computation is done (the "
"function is not further executed), and that the result is the value "
"following the <code>return</code> keyword."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:14
#, no-wrap
msgid ""
"[!java|c]double pi() {[/!][!scala]def pi(): Double = {[/!][!python]def "
"pi():[/!]\n"
"    return 3.14159[!java|c];[/!]\n"
"[!java|scala|c]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:18
msgid ""
"Actually, you can also use that <code>return</code> keyword in methods that "
"do not return any result, to interupt the computation. Of course, you should "
"not provide any value to return in that case."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:21
msgid ""
"It is possible to have several <code>return</code> instructions in several "
"branches of a conditional. In fact, it is forbidden to have any execution "
"path of your body without any <code>return</code>, or to write some code "
"after the <code>return</code> instruction. Indeed, if the machine reaches "
"the end of the function without finding any <code>return</code>, it cannot "
"know what actual value to give back to the function caller.  Moreover, "
"<code>return</code> interrupts immediately the function execution (why "
"bother looking further when you know the function result?). So, if there is "
"some code after a <code>return</code>, it must be an error and the compiler "
"warns you."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:32
#, no-wrap
msgid ""
"[!java|scala|c][!java]boolean [/!][!c]int [/!][!scala]def "
"[/!]isFrontFree()[!scala]:Boolean =[/!] {\n"
"    if (isFacingWall() == [!java|scala]true[/!][!c]1[/!]) {\n"
"        return [!java|scala]false[/!][!c]0[/!];\n"
"        <span class=\"comment\">/* no code allowed here */</span>\n"
"    } else {\n"
"        return [!java|scala]true[/!][!c]1[/!];\n"
"        <span class=\"comment\">/* here neither */</span>\n"
"    }\n"
"    <span class=\"comment\">/* even here, forget it */</span>\n"
"}[/!][!python]def isFrontFree():\n"
"    if isFacingWall() == True:\n"
"        return False\n"
"        <span class=\"comment\"># no code allowed here</span>\n"
"    else\n"
"        return True\n"
"        <span class=\"comment\"># here neither</span>\n"
"<span class=\"comment\"># even here, forget it</span>[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/returning/MethodsReturning.html:50
msgid ""
"You will once again write a function that the buggle will use. Its name must "
"be <code>haveBaggle</code>, and it returns a boolean value indicating "
"whether the row in front of the buggle contains a baggle or not. The buggle "
"will use it to search the first row containing a baggle, and stop here."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:55
msgid ""
"The easier for this function is to use a boolean variable called "
"<code>seenBaggle</code> indicating whether or not we saw a baggle so "
"far. Its initial value is "
"'[!python]False[/!][!scala|java]false[/!][!c]0[/!]'."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:59
msgid ""
"Then, move 6 steps forward (the world contains 7 cells and we already are on "
"one of them). For each cell, if it contains a baggle, we store true in "
"<code>sawBaggle</code> (and we don't do anything but moving forward if not)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:63
msgid ""
"At the end, we move back by 6 steps, and we return the value of "
"<code>seenBaggle</code> to the caller."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:67
msgid ""
"This exercise is a bit different since there is two initial worlds, each "
"with a specific objective. Your code must work for each of them. Observe "
"that the world selection scrolling menu (right below the speed slider)  "
"allows to switch the observed world."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/returning/MethodsReturning.html:72
msgid "When your function <code>haveBaggle</code> works, proceed to next exercise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:4
msgid ""
"Don't you get tired of writing again and again the code to move by a fixed "
"amount of steps? On the other hand, writing <tt>forward2()</tt>, "
"<tt>forward3()</tt>, <tt>forward4()</tt>, as well as <tt>backward2()</tt>, "
"<tt>backward3()</tt>, <tt>backward4()</tt>, and so on does not really help, "
"to say the less."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:10
msgid ""
"Luckily, it is possible to pass <b>parameters</b> to your methods. You have "
"to specify their type and name between the parenthesis after the method "
"name. Then, you can use them in the method body as if it were variables "
"defined in there, and which initial value is what the caller specified."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/args/MethodsArgs.html:15
#, no-wrap
msgid ""
"[!java|c]double [/!]divideByTwo([!java|c]double [/!]x[!scala]: "
"Double[/!])[!scala]: Double =[/!] [!java|scala|c]{[/!][!python]:[/!]\n"
"     return x / 2[!java|c];[/!]\n"
"[!scala|java|c]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:19
msgid ""
"As caller, you have to specify the initial value of this \"variables\" "
"between the call's parenthesis."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/args/MethodsArgs.html:21
#, no-wrap
msgid "[!java|c]double [/!][!scala]val [/!]result = divideByTwo(3.14)[!java|c];[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:23
msgid ""
"If you want several parameters, you need to separate them with comas (,)  "
"both in the declaration and calls."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/args/MethodsArgs.html:26
#, no-wrap
msgid ""
"[!java|c]double divide(double x, double y) {[/!]\n"
"[!scala]def divide(x:Double, y:Double): Double = {[/!]\n"
"[!python]def divide(x, y):[/!]\n"
"     return x / y[!java|c];[/!]\n"
"[!java|scala|c]}[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/args/MethodsArgs.html:31
#, no-wrap
msgid ""
"[!java|c]double res = divide(3.14 , 1.5);[/!]\n"
"[!scala]val res = divide(3.14 , 1.5)[/!]\n"
"[!python]res = divide(3.14 , 1.5)[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/args/MethodsArgs.html:35 src/lessons/welcome/methods/picture/MethodsPicture.html:35
msgid "[!java|scala]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:36
msgid ""
"In [!thelang], you can declare several methods of the same name as long as "
"they don't have the same <b>signature</b>, that is, the same amount of "
"parameters and the same parameters' types."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/args/MethodsArgs.html:40
#, no-wrap
msgid ""
"[!java]double max(double x, double y)[/!][!scala]def max(x:Double, "
"y:Double): Double =[/!] {\n"
"  if (x > y) {\n"
"    return x;\n"
"  }\n"
"  return y;\n"
"}[!java]int max(int x, int y)[/!][!scala]def max(x:Int, y:Int): Int =[/!] "
"{\n"
"  if (x > y) {\n"
"    return x;\n"
"  }\n"
"  return y;\n"
"}\n"
"[!java]int max(int x, int y; int z)[/!][!scala]def max(x:Int, y:Int, z:Int): "
"Int =[/!] {\n"
"  if (x > y && x > z) {\n"
"    return x;\n"
"  }\n"
"  if (y > z) {\n"
"    return y;\n"
"  }\n"
"  return z;\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:61
msgid ""
"Observe that we omitted the <tt>else</tt> branches of each <tt>if</tt>. It "
"works anyway because a <tt>return</tt> interrupts the method execution. If "
"we arrive to the last line of "
"<code>[!java]max(int,int)[/!][!scala]max(Int,Int):Int[/!]</code>, we know "
"that <code>x&lt;=y</code> because otherwise, the <tt>return</tt> of line 2 "
"would have stopped the execution."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:71
msgid ""
"This time, you have to write a <code> [!java|c]move(int "
"stepCount,[!java]boolean[/!][!c]int[/!] forward)[/!] [!scala]move(stepCount: "
"Int,forward: Boolean)[/!] [!python]move(stepCount,forward)[/!] </code> "
"method which moves forward by <code>stepCount</code> steps if "
"<code>forward</code> is true, and moves back of that amount of steps if the "
"boolean is false."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/args/MethodsArgs.html:79
msgid ""
"This time, there is only one world but seven buggles, all sharing the same "
"code.  This code should not be really problematic for you to write, "
"actually."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:2
msgid "Flower Pot"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:4
msgid ""
"Your buggle decided to flower a bit the pot it lives in. You have to help it "
"reproducing the drawing of its dreams (check the \"Objective\" tab to see "
"it)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:7
msgid ""
"For that, you have to write a <code>growFlowers()</code> method that does "
"not take any parameter and does not return any result. As the pattern is a "
"bit complex, you should try to decompose this drawing in sub-steps so that "
"your code remains short and easy to read. A method to draw one flower of the "
"color passed in parameter sounds like a good start, but it is probably not "
"enough."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:13
msgid ""
"For your information, this drawing uses five colors that are listed below.  "
"[!java|scala|c]The data type of these constants is <code>Color</code>, that "
"naturally describes a particular color.[/!]"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:18
msgid "<tt>[!scala|java|python]Color.[/!]RED</tt>"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:19
msgid "<tt>[!scala|java|python]Color.[/!]PINK</tt>"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:20
msgid "<tt>[!scala|java|python]Color.[/!]CYAN</tt>"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:21
msgid "<tt>[!scala|java|python]Color.[/!]ORANGE</tt>"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:22
msgid "<tt>[!scala|java|python]Color.[/!]GREEN</tt>"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/flowerpot/FlowerPot.html:23
msgid "<tt>[!scala|java|python]Color.[/!]YELLOW</tt>"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/flowerpot/FlowerCase.html:2
msgid "Flower Display Case"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/flowerpot/FlowerCase.html:4
msgid ""
"Whao! That's not a little pot anymore! That's a huge large flower display "
"case! Your buggle can't help but starts flowering this gorgeous place. You "
"should help it to prevent that it bumps into a wall..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/flowerpot/FlowerCase.html:8
msgid "PS: the newly used color is <code>Color.BLUE</code>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:2
msgid "Colorful drawing"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:11
msgid ""
"If you observe carefully the picture to draw, it is constituted of four "
"parts depicting a sort of V using a different color. A possible "
"decomposition is to write a method in charge of drawing a V of the specified "
"color from the current position. Its prototype can be:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:15
#, no-wrap
msgid ""
"[!java|c]void [/!]makeV([!java|c]Color [/!]c[!scala]: Color[/!])[!python]  "
"<span class=\"comment\"># parameter c is of type Color</span>[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:17
msgid ""
"The <code>Color</code> data type naturally describes a particular "
"color. Your code should probably call <code>makeV</code> with the following "
"arguments (a different color for each call):"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:21
msgid "[!java|scala|python]Color.[/!]YELLOW"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:22
msgid "[!java|scala|python]Color.[/!]RED"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:23
msgid "[!java|scala|python]Color.[/!]BLUE"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:24
msgid "[!java|scala|python]Color.[/!]GREEN"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:27
msgid ""
"In <code>makeV()</code>, you should use the <code>setBrushColor()</code> "
"method (predefined in the buggle) to change the color of the buggle's brush, "
"as well as <code>brushUp()</code> and <code>brushDown()</code> to change the "
"brush position."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:32
msgid ""
"It may be wise to write the <code>makeV()</code> so that it places directly "
"the buggle in position for the next V."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPicture.html:36
msgid ""
"Your turn now. I'm sure you can imagine the other methods you need to keep "
"your code simple and pleasant to read.  Complete the method "
"<code>run()</code> that should be called automatically (once).  [!java]the "
"<code>public</code> keyword means more or less that anybody can call this "
"method, which is good because the PLM infrastructure calls it directly.[/!]"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/picture/MethodsPictureLarge.html:2
msgid "Larger colorful drawing"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPictureLarge.html:8
msgid ""
"You thus have to declare even more methods to use the repetitions of the "
"pattern and factorize your code. Another solution is to <i>parametrize</i> "
"your functions to reuse the code you wrote previously by changing the size."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/MethodsPictureLarge.html:13 src/lessons/welcome/traversal/Snake.html:40 src/lessons/welcome/traversal/column/TraversalByColumn.html:50 src/lessons/welcome/traversal/line/TraversalByLine.html:11 src/lessons/welcome/traversal/diagonal/TraversalDiagonal.html:11 src/lessons/welcome/traversal/zigzag/TraversalZigZag.html:7
msgid "Your turn..."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/picture/PatternPicture.html:2
msgid "Another Colorful Pattern"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/picture/PatternPicture.html:4
msgid ""
"Here is yet another exercise where you have to reproduce the pattern "
"provided in the \"Objective\" tab."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PatternPicture.html:7
msgid ""
"This one is a bit more difficult than the one seen previously. Look for "
"repeating patterns, even if the color changes, and write a method drawing "
"each of them."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/picture/PatternPicture.html:11 src/lessons/lander/lvl1_lander_101/Lander101.html:42
msgid "Good luck!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugHunting.html:4
msgid ""
"Now that your <code>isFacingTrail()</code> method is working, it's time to "
"write the code to organize the hunting party. Copy/paste your code from the "
"previous exercise, and complete the <code>hunt()</code> method."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugHunting.html:8
msgid ""
"Following a track is not very difficult: move forward as long as you have "
"the track in front of you.  If there is not track in front of you anymore, "
"check whether the rest of the track is on your left or on your right, and "
"follow it further."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugHunting.html:12
msgid ""
"To ensure that you don't mix the track you come from with the one in front "
"of you, the easier is to erase the track when you follow it. Use the method "
"<code>brushDown()</code> to put your brush down and mark the ground, and "
"<code>brushUp()</code> to move it up again."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugHunting.html:16
msgid ""
"Finally, do not forget to capture your prey once you found it (using "
"<code>pickupBaggle()</code>)."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/methods/slug/SlugHunting.html:20
msgid ""
"<a name=\"Objectives\"> Complete the <code>hunt()</code> method. You "
"probably want to copy over the <code>isFacingTrail()</code> method that you "
"wrote in previous exercise.  </a>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugTracking.html:4
msgid ""
"Your buggle is super happy! It just found the green dribbling trail, "
"certainly left by a big yummy slug.  At its end, the buggle is certain to "
"entertain itself with this appetizing slug (represented as a baggle)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugTracking.html:8
msgid ""
"To reach that goal, you had to write a boolean method "
"<tt>isFacingTrail</tt>, which determines whether we are facing a green cell "
"or not. Of course, if we are facing a wall, it should return false without "
"bumping into it. You should make sure that this method has no <b>side "
"effect</b>, i.e. that it does not change the state of the calling buggle nor "
"of its world."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugTracking.html:13
msgid ""
"Your tool to that end is the <code>getGroundColor()</code> that returns the "
"color of the current cell. Just go to the cell you want to test and run that "
"function.  [!java]You cannot test whether this color is equal to "
"<code>Color.green</code> with an <code>==</code> sign but instead you have "
"to write something like "
"<code>getGroundColor().equals(Color.green)</code>. This is because green is "
"an <i>object</i> in Java, and <code>.equals()</code> is the way to go to "
"test equality between Java objects.[/!] [!python|scala|c]So you just have to "
"test whether the returned color is equal to the value "
"<code>[!scala|python]Color.green[/!][!c]GREEN[/!]</code>, that represents "
"the green color.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugTracking.html:24
msgid ""
"Complete the <code>isFacingTrail()</code> method (which gets called "
"automatically)."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/methods/slug/SlugSnail.html:2
msgid "Slugs and Snails"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugSnail.html:4
msgid ""
"Yuhu! This time, your buggle found the tracks of much more preys! In the "
"first world, that's a yummy Kitty Slug (leaving a pink trail) while on the "
"second world, that's a big fat snail that awaits your buggle at the end of "
"the orange trail."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugSnail.html:8
msgid ""
"You have to copy/paste your code again, and change it so that your methods "
"take the color of the trail to follow as a parameter. Beside of this, your "
"code should work as earlier."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/methods/slug/SlugSnail.html:11
msgid ""
"Don't get lost on false leads! <code>The hunt()</code> method was given a "
"parameter to tell you which color to follow (and it is not the same in all "
"worlds). Add a parameter to your <code>isFacingTrail()</code> method to only "
"follow the requested color, as the other colors lead to dead ends..."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/bdr/BDR.html:2
msgid "Buggle Dance Revolution (BDR)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:4
msgid ""
"After these races, it's time to party! For that, we will teach the buggles "
"to play Dance Revolution, this game beloved of some students: The player has "
"to move the feet on the carpet according to the instructions presented on "
"the screen, and following the music. But before that, we have some details "
"to study first."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bdr/BDR.html:9 src/lessons/welcome/bdr/BDR2.html:4 src/lessons/recursion/lego/square/FourSquare.html:28
msgid "[!java|scala|c]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR.html:10
msgid "Conditionals without curly braces"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:12
msgid ""
"There is one detail we omitted about the conditional syntax: if a branch "
"contains only one instruction, then the curly braces become optional. So, "
"the two chunk of code are equivalent:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:16
#, no-wrap
msgid ""
"if (<b>condition</b>) {\n"
"    <b>whatToDoIfTheConditionIsTrue();</b>\n"
"} else {\n"
"    <b>whatToDoElse();</b>\n"
"}"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:21
#, no-wrap
msgid ""
"if (<b>condition</b>) \n"
"    <b>whatToDoIfTheConditionIsTrue();</b>\n"
"else\n"
"    <b>whatToDoElse();</b>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:26
msgid ""
"Actually, you can do the same for loops body that are reduced to one "
"instruction only.  But beware, this becomes dangerous if you chain the "
"<tt>if</tt> instructions like this:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:28
#, no-wrap
msgid ""
"if (isOverBaggle())    \n"
"     if (x == 5)\n"
"          left();\n"
"else\n"
"     right();\n"
"[!c]stepForward();[/!][!java|scala]forward();[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:35
msgid ""
"In fact, it does not turn right when there is no baggle on the ground AND x "
"equals 5, but when the buggle found a baggle on the ground and x equals "
"anything but 5. Putting this otherwise, the buggle understands the previous "
"code as if it were written the following way (note that the <tt>else</tt> "
"were moved to the right):"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:40
#, no-wrap
msgid ""
"if (isOverBaggle())    \n"
"        if (x == 5)\n"
"            left();\n"
"        else\n"
"            right();\n"
"[!c]stepForward();[/!][!java|scala]forward();[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:47
msgid ""
"The first lesson of this is that the indentation is very important to help "
"humans understanding, even if it does not change the actual meaning of the "
"code. We could have written the following code and obtain the same "
"result. But if you want a human to read and review your code, you really "
"want to indent it correctly. That's for example the case if you want a "
"professor to read it (to grade it or to answer a question about it), or if "
"you want to reuse your code later, or even if you need to debug your code "
"yourself."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:55
#, no-wrap
msgid ""
"if (isOverBaggle()) if (x == 5) left(); else right(); "
"[!c]stepForward();[/!][!java|scala]forward();[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:57
msgid ""
"The second lesson is that a <tt>else</tt> branch always connects to the "
"closest <tt>if</tt>. This may be a bit troublesome in some case, and it may "
"be easier to add more braces than strictly needed to remove any ambiguity."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR.html:62
msgid "Chaining conditionals"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:64
msgid "You sometimes want to ask the buggle something similar to:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:65
#, no-wrap
msgid ""
"if it's raining, take an umbrella;\n"
"if not, and if it's a hot day, take a bottle of water;\n"
"if not and if it's July 4th, take an American flag"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:69
msgid ""
"The trap is that we want at most one of these actions to be taken. That is "
"to say, if it's raining a very hot July 4th, we don't want the buggle to get "
"outside with an umbrella, some water and a flag, but simply with an "
"umbrella. The following code is thus WRONG."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:74
#, no-wrap
msgid ""
"[!scala|c|java]if (rainy())\n"
"    takeUmbrella();\n"
"if (hot())\n"
"    takeWater();\n"
"if (todayIsJuly4th())\n"
"    takeFlag();[/!][!python]if rainy():\n"
"    takeUmbrella()\n"
"if hot():\n"
"    takeWater()\n"
"if todayIsJuly4th():\n"
"    takeFlag()[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:87
msgid ""
"Indeed, since the conditions are evaluated one after the other, there is a "
"risk that you go to the July 4th march on a rainy day. Instead, we should "
"use something like this to ensure that once we found a true condition, we "
"won't evaluate the next ones."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:92
#, no-wrap
msgid ""
"[!java|scala|c]if (rainy()) {\n"
"    takeUmbrella();\n"
"} else {\n"
"    if (hotDay()) {\n"
"        takeWater();\n"
"    } else {\n"
"        if (todayIsJuly4th()) {\n"
"            takeFlag();\n"
"        }\n"
"    }\n"
"}[/!][!python]if rainy():\n"
"    takeUmbrella()\n"
"else:\n"
"    if hotDay():\n"
"        takeWater()\n"
"    else:\n"
"        if todayIsJuly4th():\n"
"            takeFlag()[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:112
msgid ""
"Unfortunately, such a cascade of conditionals is quite difficult to read. It "
"is better to [!java|scala|c]omit the curly braces for the <tt>else</tt> "
"statements. Some languages even introduce a specific construct for these "
"<tt>else if</tt>, but not [!thelang].[/!] [!python]change the sub-blocks "
"using the <code>elif</code> keyword to mark explicitly these \"else if\" "
"branches.[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR.html:119
#, no-wrap
msgid ""
"[!c|java|scala]if (rainy()) { \n"
"    takeUmbrella();\n"
"} else if (hotDay()) {\n"
"    takeWater();\n"
"} else if (todayIsJuly4th()) {\n"
"    takeFlag();\n"
"}[/!][!python]if rainy():\n"
"    takeUmbrella()\n"
"elif hotDay():\n"
"    takeWater()\n"
"elif todayIsJuly4th():\n"
"    takeFlag()[/!]"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR.html:132
msgid "Graffiti in the Buggle World"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:134
msgid ""
"Buggles can tag graffitis on the ground of their world. For that, they use "
"the four following methods:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/bdr/BDR.html:138
msgid ""
"<code>[!c]int[/!][!java]boolean[/!] "
"isOverMessage()[!scala]:Boolean[/!]</code>: returns "
"<code>[!c]1[/!][!java|scala]true[/!][!python]True[/!]</code> if and only if "
"there is a message on the ground."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/bdr/BDR.html:141
msgid ""
"<code>[!c]char*[/!][!java]String[/!] readMessage()[!scala]: "
"String[/!]</code>: returns the message written on the ground (or an empty "
"string if nothing is written)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/bdr/BDR.html:143
msgid ""
"<code>[!java|c]void[/!] writeMessage([!c]char*[/!][!java]String "
"[/!]msg[!scala]: String[/!])</code>: writes the specified message down on "
"the ground. If there is already a message on the ground, the new content is "
"added at the end of the existing message."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/bdr/BDR.html:146
msgid ""
"<code>[!java|c]void [/!]clearMessage()</code>: clears what is written on the "
"ground."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bdr/BDR.html:150
msgid ""
"The goal is then to organize a BDR game between the buggles by teaching them "
"to move according to the instructions written on the ground. These "
"instructions are messages written on the ground, with the following "
"signification:"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:156 src/lessons/welcome/bdr/BDR2.html:139
msgid "Message"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:157 src/lessons/welcome/bdr/BDR2.html:140
msgid "What to do"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:158
msgid "Mnemonic"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:160 src/lessons/welcome/bdr/BDR2.html:142
msgid "[!java|c]'R'[/!][!scala|python]\"R\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:160 src/lessons/welcome/bdr/BDR2.html:142
msgid "Turn right and move one step forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:160
msgid "Right"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:161 src/lessons/welcome/bdr/BDR2.html:143
msgid "[!java|c]'L'[/!][!scala|python]\"L\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:161 src/lessons/welcome/bdr/BDR2.html:143
msgid "Turn left and move one step forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:161
msgid "Left"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:162 src/lessons/welcome/bdr/BDR2.html:144
msgid "[!java|c]'I'[/!][!scala|python]\"I\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:162
msgid "Turn back (U-turn) and move one step forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:162
msgid "Inverse"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:164 src/lessons/welcome/bdr/BDR2.html:146
msgid "[!java|c]'A'[/!][!scala|python]\"A\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:164 src/lessons/welcome/bdr/BDR2.html:146
msgid "Move one step forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:164
msgid "First letter of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:165 src/lessons/welcome/bdr/BDR2.html:147
msgid "[!java|c]'B'[/!][!scala|python]\"B\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:165 src/lessons/welcome/bdr/BDR2.html:147
msgid "Move two steps forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:165
msgid "Second letter of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:166 src/lessons/welcome/bdr/BDR2.html:148
msgid "[!java|c]'C'[/!][!scala|python]\"C\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:166 src/lessons/welcome/bdr/BDR2.html:148
msgid "Move three steps forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:166
msgid "Third letter of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:168 src/lessons/welcome/bdr/BDR2.html:153
msgid "[!java|c]'Z'[/!][!scala|python]\"Z\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:168 src/lessons/welcome/bdr/BDR2.html:153
msgid "Move one step backward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:168
msgid "One letter before the end of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:169 src/lessons/welcome/bdr/BDR2.html:154
msgid "[!java|c]'Y'[/!][!scala|python]\"Y\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:169 src/lessons/welcome/bdr/BDR2.html:154
msgid "Move two steps backward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:169
msgid "Two letters before the end of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:170 src/lessons/welcome/bdr/BDR2.html:155
msgid "[!java|c]'X'[/!][!scala|python]\"X\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:170 src/lessons/welcome/bdr/BDR2.html:155
msgid "Move three steps backward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:170
msgid "Three letters before the end of the alphabet"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:171 src/lessons/welcome/bdr/BDR2.html:159
msgid "<i>(anything else)</i>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR.html:171 src/lessons/welcome/bdr/BDR2.html:159
msgid "Stop dancing."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR.html:174
msgid "Indications"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bdr/BDR.html:176
msgid ""
"This exercise may seem a bit complex at the first glance, but it comes down "
"to summarizing the information of the table in a sequence of conditionals."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:179
msgid ""
"You have to keep dancing as long as there is some dancing steps to do, i.e., "
"as long as we are in a cell which content is described in the table.  The "
"easier for that is to use a boolean variable (<code>finished</code>)  as "
"termination condition to a <code>while</code> loop.  It should be "
"initialized to "
"<code>[!c]0[/!][!java|scala]false[/!][!python]False[/!]</code>, and switched "
"to <code>[!c]1[/!][!java|scala]true[/!][!python]True[/!]</code> as soon as "
"the buggle find a cell with a value not described in the table.  Thus, the "
"loop will stop and the program will terminate."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:189
msgid ""
"Another subtlety is that detecting if strings are equals is a bit annoying "
"in [!thelang].  So, we use the <code>char getIndication[!c]Bdr[/!]()</code> "
"instead of <code>[!java]String[/!][!c]char*[/!] readMessage()</code>.  This "
"method, only known by the buggles of this exercise, returns the first char "
"of the message written on the ground (or ' ' -- the space char -- if nothing "
"is written down). It enables to work with chars instead of strings, that is "
"much simpler in [!thelang]."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR.html:197
msgid "Tips and Hints"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bdr/BDR.html:199
msgid ""
"If you fail to understand why the buggle does not execute the expected "
"steps, try adding <code>brushDown()</code> in your method. This asks the "
"buggle to put down a brush leaving a trail when it moves. It should help you "
"understanding its trajectory, but do not forget to remove this call when you "
"want to test whether your code is a valid solution to the exercise: you are "
"asked to let the buggle dance, not to vandalize the dance floor."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR.html:206
msgid "When your program finally works, move on to the next exercise."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/bdr/BDR2.html:2
msgid "Buggle Dance Revolution 2 (BDR2)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:5
msgid ""
"BDR is cool, but it's a bit chaotic. First, the buggles giggle in any "
"directions, and then the code you had to write to let them move is rather "
"difficult to read. Here is a new BDR world where the buggle will dance a "
"gentle circle. We will benefit this tranquillity to clean up a bit our code "
"thanks to the new constructs we will introduce."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/welcome/bdr/BDR2.html:11
msgid "[!java|c]<code>switch</code> conditionals[/!][!scala]Pattern matching[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:13
msgid ""
"The hardest part of previous code is certainly the conditional "
"cascading. Somewhere in your code, you certainly had something similar to:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:16
#, no-wrap
msgid ""
"if ([!java|c]getIndication() == 'R'[/!][!scala]readMessage() == \"R\"[/!]) "
"{\n"
"  right();\n"
"  [!c]stepForward()[/!][!java|scala]forward()[/!];\n"
"} else if ([!java|c]getIndication() == 'L'[/!][!scala]readMessage() == "
"\"L\"[/!]) {\n"
"  left();\n"
"  [!c]stepForward()[/!][!java|scala]forward()[/!];\n"
"} else if ([!java|c]getIndication() == 'I'[/!][!scala]readMessage() == "
"\"I\"[/!]) {\n"
"  back();\n"
"  [!c]stepForward()[/!][!java|scala]forward()[/!];\n"
"<span class=\"comment\">/* other else if */</span>\n"
"} else {\n"
"  finished = [!c]1[/!][!java|scala]true[/!];\n"
"}\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:31
msgid ""
"When you review this code, it may not be clear at the first glance that it "
"is simply a choice with 4 branches depending on the value of "
"[!java|c]getIndication()[/!][!scala]readMessage()[/!].  To improve this, we "
"will use a [!java|c]<code>switch</code> construct, which Java syntax is the "
"following:[/!] [!scala] pattern matching, which is a very powerful construct "
"that greatly generalizes the <code>if</code>. It is arguably one of the "
"major advantages of Scala when compared to languages such as Java or "
"python.  It is not new either, as other languages such as OCaml or Haskell "
"offer this feature since long, but still.  It's really cool![/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bdr/BDR2.html:40
msgid "[/!] [!java|c]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:44
#, no-wrap
msgid ""
"switch (<b>expression</b>) {\n"
"  case <b>firstValue</b>: \n"
"    <b>whatToDoIfExpressionEqualsFirstValue();</b>\n"
"    break;\n"
"  case <b>secondValue</b>: \n"
"    <b>whatToDoIfExpressionEqualsSecondValue();</b>\n"
"    break;\n"
"  case <b>thirdValue</b>: \n"
"    <b>whatToDoIfExpressionEqualsThirdValue();</b>\n"
"    break;\n"
"    /* as much similar cases as you want */\n"
"  default: \n"
"    <b>whatToDoIfExpressionDoesNotEqualsAnySeenValues();</b>\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:59
msgid ""
"Observe that each branch of a <tt>switch</tt> must be ended by a "
"<code>break</code>. If you forget this, the machine keeps going and execute "
"the next branch in the list after the branch it jumped to. There is even "
"some <b>rare</b> cases where this behavior reveals helpful."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:64
msgid ""
"It is then possible to rewrite previous BDR code in a cleaner way using the "
"<tt>switch</tt> construct:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:67
#, no-wrap
msgid ""
"switch (getIndication()) {\n"
"  case 'R':\n"
"    right(); \n"
"    [!c]stepForward()[/!][!java]forward()[/!]; \n"
"    break;\n"
"  case 'L':\n"
"    left();\n"
"    [!c]stepForward()[/!][!java]forward()[/!]; \n"
"    break;\n"
"  case 'I':\n"
"    back();\n"
"    [!c]stepForward()[/!][!java]forward()[/!];\n"
"    break;\n"
"  default: \n"
"    return;\n"
"}"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:85
#, no-wrap
msgid ""
"<i>expression</i> <b>match</b> {\n"
"  <b>case</b> <i>possible value</i> <b>=></b> instructions\n"
"  <b>case</b> <i>other value</i>     <b>=></b> other instructions\n"
"  <b>case</b> <i>another value</i> <b>=></b> yet another instructions\n"
"  <b>case _                 =></b> default instructions\n"
"}\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:92
msgid ""
"The expression provided before the keyword <code>match</code>, and then the "
"branches are evaluated one after the other until we find one which value "
"provided between <code>case</code> and <code>=&gt</code> is equal to the "
"expression's value.  The <code>_</code> symbol acts as a wildcard, so the "
"<code>_</code> branch <i>always</i> matches.  Here is an example where a "
"variable <code>name</code> is matched."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:97
#, no-wrap
msgid ""
"name match {\n"
"  case \"Martin\" => println(\"Hello Martin, how are you?\")\n"
"  case \"Gerald\" => println(\"Hey Gerald! How are you doing?\")\n"
"  case _            => println(\"Welcome stranger.\")\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:103
msgid ""
"It is possible to have more than one instruction per branch, and merge "
"branches when the values are separated by a | symbol."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:105
#, no-wrap
msgid ""
"name match {\n"
"  case \"Martin\" | \"Gerald\" => println(\"Hello \"+name+\", how are "
"you?\"); openTheDoor()\n"
"  case _                            => println(\"Hello stranger. Please do "
"not pass.\"); lockTheDoor()\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:110
msgid ""
"You can even add guards to your branches. These are extra conditions that "
"must be respected for the branch to get applied. This is handy if you want "
"match on value ranges, as follows."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:112
#, no-wrap
msgid ""
"age match {\n"
"  case i if i&lt;10 => println(\"Hey kid!\")\n"
"  case i if i&lt;20 => println(\"Hey dude!\")\n"
"  case i if i&lt;30 => println(\"Hello young man\")\n"
"  case _           => println(\"Hello Sir\")\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:118
msgid ""
"Note that there is no need to check whether the value is higher than 10 on "
"the second line because the first matching branch is used. So, if the second "
"branch gets evaluated, then the first one did not match."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:121
msgid "Finally, it is possible also to match several variables in one shoot!"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/bdr/BDR2.html:122
#, no-wrap
msgid ""
"(x,y) match {\n"
" case (0,0) => println(\"that's the origin\")\n"
" case (_,0) => println(\"On the ordinate\")\n"
" case (0,_) => println(\"On the abscissa\")\n"
" case (_,_) => println(\"Some random point\")\n"
"}"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:129
msgid ""
"I told you that scala's pattern matching is very powerful! I actually love "
"this feature!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:133
msgid ""
"[!java|scala|c]Apply the improvement we just saw to rewrite your buggle code "
"with the following dance steps. [/!] [!python]Let's teach a new dance step "
"to the buggles. It is slightly more complex but actually better "
"looking. Beside of that, that's the same old story.[/!] Note that we can now "
"move up to 6 cells in one dance step."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:144
msgid "Turn back and move one step forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:149
msgid "[!java|c]'D'[/!][!scala|python]\"D\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:149
msgid "Move four cells forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:150
msgid "[!java|c]'E'[/!][!scala|python]\"E\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:150
msgid "Move five cells forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:151
msgid "[!java|c]'F'[/!][!scala|python]\"F\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:151
msgid "Move six cells forward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:156
msgid "[!java|c]'W'[/!][!scala|python]\"W\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:156
msgid "Move four cells backward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:157
msgid "[!java|c]'V'[/!][!scala|python]\"V\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:157
msgid "Move five cells backward"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:158
msgid "[!java|c]'U'[/!][!scala|python]\"U\"[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/welcome/bdr/BDR2.html:158
msgid "Move six cells backward"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bdr/BDR2.html:163
msgid "When you program works again, proceed to next exercise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:4
msgid ""
"We will now teach the buggle to explore its world. Its initial position is "
"the bottom left corner, and it should visit any cells up to the top "
"(coloring the ground on its path. The main loop of your code is something "
"like:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/traversal/Snake.html:8
#, no-wrap
msgid ""
" move brush down\n"
" while we did not reach the final position\n"
"   move like a snake\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:13
msgid ""
"We thus have to write two specific methods: The first one returns a boolean "
"indicating whether we are on a final position while the second moves one "
"snake step forward."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:17
msgid "We reached the final position if and only if both conditions are true:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/traversal/Snake.html:19
msgid "We are facing a wall"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/traversal/Snake.html:20
msgid ""
"There is a wall on the north of the buggle. So, if the buggle is facing "
"east, you should check whether there is a wall on the left, and if the "
"buggle is facing west, you should check on the right side."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/traversal/Snake.html:23
msgid ""
"We can get the current heading of the buggle using the "
"<code>getDirection()</code>, and we know whether it looks east using "
"<code>getDirection() == [!scala|python|java]Direction.[/!]EAST</code> (WEST "
"for west)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/welcome/traversal/Snake.html:26
msgid ""
"To check, nothing magical: you have to turn the buggle and check whether it "
"is facing a wall afterward."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:29
msgid ""
"Then, a snake step can be achieved by moving one step forward if we are not "
"facing a wall, and moving to the upper line else (i.e., if you look to the "
"west facing a wall, you have to turn right, forward and turn right)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:33
msgid ""
"Hint: the main loop of your code must continue while the testing function "
"returns false. There is two ways of writing it:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/traversal/Snake.html:35
#, no-wrap
msgid ""
"while (testingFunction() == [!c]0) {[/!][!java|scala]false) "
"{[/!][!python]False):[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/Snake.html:36
msgid ""
"[!python]You may prefer to write it as:[/!] [!java|scala|c]Since the "
"exclamation mark (!) denotes the boolean negation in [!thelang], you may "
"write it as:[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/traversal/Snake.html:38
#, no-wrap
msgid ""
"while ([!java|scala|c]![/!][!python]not "
"[/!]testingFunction())[!java|scala|c] {[/!][!python]:[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:4
msgid ""
"The goal of this serie of exercises is to let the buggle traverse its "
"world. It must number the cells it walks on to show its traversal order."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:7
msgid "The main loop of your code should be something like:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:9
#, no-wrap
msgid ""
" while we are not on the final position\n"
"   go to the next position\n"
"   label the cell with its number\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:14
msgid ""
"In contrary to the exercises we saw so far, we won't use the "
"<code>forward()</code>, <code>backward()</code> and similar "
"methods. Instead, we will compute the coordinate of the next buggle position "
"and use the <code>setPos(x, y)</code> method to <i>teleport</i> the buggle "
"directly to this position. For example, <code>setPos(3, 5)</code> teleports "
"the buggle to the cell where x=3 and y=5."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:21
msgid ""
"Your first task is thus to write a boolean function indicating whether the "
"buggle reached the final position or not, ie if it reached the bottom right "
"corner of the world. For this, you can use <code>getWorldWidth()</code> and "
"<code>getWorldHeight()</code> which return respectively the world's width "
"and height. Your test is about comparing the buggle's current position (that "
"you can access with <code>getX()</code> and <code>getY()</code>) to the "
"world dimensions."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:28
msgid ""
"Beware, the first line and column are numbered 0 and not 1, and the point "
"(0,0)  is on the top left corner. This may seem surprising, but it is very "
"often so in Computer Science."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:32
msgid ""
"Then, you have to write the code to reach the next position. In this "
"exercise, you have to traverse the world row after row. So, if you are at "
"the bottom of a row, you have to move to the top of next row. Else, you have "
"to move to the cell below."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:37
msgid ""
"At this point, you can launch your program to check that the buggle "
"correctly traverse the world in the expected order, and that it stops when "
"it has to. Use the <b>stop</b> button if the buggle does not stop correctly."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:41
msgid ""
"It is now time to write down the cell numbers. For that, you will need a "
"counter initialiser to zero at the beginning of your code, and incremented "
"by one at each step (for example with <code>counter += 1;</code>).  Then, "
"you have to use <code>writeMessage()</code> to write the value on the "
"ground."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/column/TraversalByColumn.html:47
msgid ""
"You probably need to write the first [!java|scala|c]or last [/!]value out of "
"the main loop [!java|scala|c], depending on whether you prefer to use a "
"<code>while</code> or a <code>do/while</code> one[/!]."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/traversal/line/TraversalByLine.html:4
msgid ""
"You once again have to let the buggle traverse the world numbering the cells "
"on its way, but the goal of this exercise is to write a line traversal. Most "
"of the code you wrote for previous exercise remains usable here. Simply, the "
"method computing the coordinates of the next buggle position has to be "
"correctly updated: if you are at the right of a line, you have to go to the "
"beginning of the next one. If not, you have to go to the right cell."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/diagonal/TraversalDiagonal.html:4
msgid ""
"This time, you are asked to traverse the world one diagonal after the "
"other. Have a look at the objective world for more details on the requested "
"traversal order."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/traversal/diagonal/TraversalDiagonal.html:8
msgid ""
"You may find useful to use an integer variable <code>diag</code> storing the "
"number of the diagonal you are traversing."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/traversal/zigzag/TraversalZigZag.html:4
msgid ""
"This time, you have to zigzag on the way up. Have a look at the objective "
"world for more details on the requested traversal order."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/welcome/summative/Moria.html:2
msgid "Lost in the Moria"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/summative/Moria.html:4
msgid ""
"You buggles got stuck in the mines of Moria! Some rocks are blocking the "
"exit, and you will have to clear your way to the exit. Well of course these "
"are only baggles and you could simply walk away, but it will be easier to "
"program the buggles so that they move those \"rocks\" than convincing them "
"to walk away without solving the problem. Dwarfs are sometimes really "
"stubborns..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/summative/Moria.html:11
msgid ""
"So, you have to find the first baggle blocking the exit (simply walk to the "
"east until you are over a baggle), take it and move it back to the other "
"side of the tunnel (walk to the west while you are not over a baggle, and "
"then move back one step to the east and drop your baggle), and iterate until "
"you find the exit (that is, the wall to the east side). Afterward, move out "
"as in the objective world. That's only a few more steps away."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/summative/Moria.html:18
msgid ""
"To make things worse, you have to write a program that works for every "
"buggle, even if writing a specific program for each of them would be "
"easier. It seems that using <code>while</code> loops is the only solution to "
"move the buggles correctly."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/summative/Moria.html:23
msgid ""
"Once you manage to escape this trap, you can move forward to the next "
"exercise.  This exercise is a bit more complex, so you can also leave it for "
"now and come back later if you don't get it right now."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/turmites/Main.html:2 src/lessons/turmites/short_desc.html:2
msgid "The turmites"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/Main.html:4
msgid ""
"This set of activities lets you play with Langton's ants, that are 2D turing "
"machines. They constitute very simple application problems, achievable by "
"beginners, and open the door to an amazing world."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/Main.html:8
msgid ""
"This mechanism were invented in 1986 by Chris Langton, and later generalized "
"in several ways (as we shall see in the next exercises). It was proven that "
"Turmites and Turing machines are of equal power: An ant's trajectory can be "
"used to compute any boolean circuit, and thus that an ant is capable of "
"universal computation. Put simply, any possible computation can be achieved "
"using a turmite as a computing device. Yet another subject of fascination..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/Main.html:14
msgid ""
"Multicolor Langton's ants were discovered in 1995 by Propp et Al. Another "
"funny fact is that the ants which name is a list of consecutive pair of "
"identical letters (LL and RR) produce symmetric patterns. This fact was even "
"formally proved."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/Main.html:19
msgid ""
"Check the corresponding wikipedia web page, of which this exercise is "
"inspired, for further details."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/turmites/Main.html:22 src/lessons/sort/basic/Main.html:15 src/lessons/sort/dutchflag/Main.html:9 src/lessons/sort/pancake/Main.html:30 src/lessons/sort/baseball/Main.html:28 src/lessons/turtleart/Main.html:12
msgid "What can I do to improve this PLM universe?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/Main.html:24 src/lessons/sort/basic/Main.html:17 src/lessons/sort/dutchflag/Main.html:11 src/lessons/sort/pancake/Main.html:32 src/lessons/sort/baseball/Main.html:30 src/lessons/turtleart/Main.html:14 src/lessons/recursion/cons/Main.html:7
msgid ""
"As usual, there are several things that could be done in the code of this "
"universe to improve it:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/Main.html:26
msgid ""
"We are probably missing some good exercises. The turmite creator exercise is "
"a bit harsh: we could introduce the patterns in a more friendly manner."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/Main.html:28
msgid "We may want to write an exercise on the busy beaver, maybe?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/short_desc.html:3
msgid "Discover the Langton's ants, that are 2D turing machines."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/short_desc.html:5
msgid ""
"These activities are very simple application problems, achievable by "
"beginners, and open the door to an amazing world."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/langton/Langton.html:2
msgid "Langton's ant"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:4
msgid ""
"In this exercise, you will turn your buggle into a <i>Langton's "
"ant</i>. These artificial little animals are very interesting because they "
"are given simple rules that depend only on their local environment, and "
"after a period of apparent chaotic behavior, a general pattern "
"<i>emerges</i>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:9
msgid ""
"The rules are absolutely trivial: to compute what the next step should be, "
"you should check the current color of the ground (using "
"<code>getGroundColor()</code>). If it's white, change it to black, turn "
"right and move forward by one cell. If the ground is currently black, change "
"it to white, turn left and move forward by one cell."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:15
msgid ""
"It's hard to come up with simpler rules isn't it? Well, let's go and code it "
"now. You have to complete the <code>step()</code> method, which encodes the "
"behavior of the ant at each step. You will probably use the "
"<code>getGroundColor()</code> method to retrieve the color of the cell on "
"which the ant is currently.  Colors of interest are simply named "
"<code>Color.black</code> and <code>Color.white</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:22
msgid ""
"To compare colors, you cannot use the equal signs (==), because these things "
"are not scalar values but objects. Instead, you need to write something like "
"the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/turmites/langton/Langton.html:25
#, no-wrap
msgid ""
"Color c /* = some initialization */;\n"
"if (c.equals(Color.black)) {\n"
"  /* that's equal */\n"
"} else {\n"
"  /* that was not equal */\n"
"}\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:34
msgid ""
"Changing the ground color is not difficult, but a bit long: you have to "
"change the brush color of your buggle, set the brush down (to mark the "
"current cell -- with <code>brushDown()</code>), and set the brush back up "
"(with <code>brushUp()</code>) to avoid further issues when the buggle will "
"move. You are naturally free of organizing your code the way you want, but "
"you may want to write a <code>setGroundColor(color)</code> method to "
"factorize things a bit."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langton/Langton.html:41
msgid ""
"As you can see from the execution of this exercise, the interest in this "
"algorithm is that after about 10000 steps of relative chaotic behavior, the "
"ant start building a regular pattern. This emergence of a regular pattern "
"from the chaos is rather fascinating, isn't it? Move on to the next exercise "
"to see more of them."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:2
msgid "Multicolor Langton's ant"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:4
msgid ""
"There is several ways to extend the concept of Langton's ant. In this "
"exercise, we explore first one, using more than two colors. It remains very "
"similar to the base case: the behavior at each step still depends on the "
"ground color, but you have more than 2 possibilities. It allows to have more "
"than one kind of ant, depending on what you decide to do for each color. For "
"example, the ant LRL takes 3 colors. It turns left on the first color, right "
"on the second one and left on the third color. According to this definition, "
"the basic ant is a RL (since it turns right on white cells and left on black "
"ones)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:13
msgid ""
"Some of these ants draw fascinating patterns (switch the world to see them): "
"LLRR build a symmetric figure resembling loosely to a ball, LRRRRRLLR draws "
"a square, LLRRRLRLRLLR draws a convoluted regular pattern after a period of "
"seemingly chaotic behavior, and RRLLLRLLLRRR seems to fill a hour glass..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:18
msgid ""
"Changing your buggle into a generic Langton's ant is not very complicated, "
"although it is not completely trivial. As previously, you have to write a "
"<code>step</code> function. But this time, it receives two arrays as "
"parameters.  The first one defines the rules to follow depending on the "
"ground color while the second one gives the sequence of colors to use. For "
"example, the basic ant would have [!java]<code>{'R', 'L'}</code> and "
"<code>{Color.white, Color.black}</code>[/!] [!python]<code>['R', 'L']</code> "
"and <code>[Color.white, Color.black]</code>[/!] [!scala]<code>Array('R', "
"'L')</code> and <code>Array(Color.white, Color.black)</code>[/!] as "
"arguments."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:29
msgid "At each step, you thus have to apply the following pseudo-code:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:31
msgid "Find the position of the ground color in the color sequence;"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:32
msgid ""
"Turn left or right depending on the content of the rule array at that "
"position;"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:33
msgid ""
"Mark the current ground with the next color in the sequence (the last color "
"being followed by the first one);"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:34
msgid "Move forward by one step."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/langtoncolors/LangtonColors.html:37 src/lessons/turmites/helloturmite/HelloTurmite.html:67
msgid "You now should have enough information to succeed."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:2
msgid "Turmites"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:4
msgid ""
"This exercise explores a new way to extend the concept of Langton's "
"ant. Now, the behavior of the ant not only depends on the color on the "
"ground, but also on its internal state (represented by an integer "
"value). The idea of changing the ant into such an automata naturally comes "
"from the Turing machine concept. This explains the name of these new "
"animals, which is a portemanteau of <i>Turing</i> and <i>Termite</i> (if you "
"don't know what a Turing machine is, you should run to wikipedia, because it "
"is simply impossible to be a real computer scientist before that)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:13
msgid ""
"Once again, you just have to write the <code>step()</code> method, in charge "
"of doing one turmite's step. Once again, you should first find the rank of "
"the current's cell ground color in the color sequence. But this time, the "
"<code>rule</code> data depends both on the current color and the current "
"state.  <code>rule</code> actually contains 3 information in each situation: "
"the color to write, the move to do, and the next state value. For example, "
"[!java|python]rule[1][0][/!][!scala]rule(1)(0)[/!] contains the informations "
"to use when <code>state==1</code> and <code>color==0</code>.  In other "
"worlds, you can retrieve the information relative to your current situation "
"by using "
"<code>[!java|python]rule[state][currentColor][/!][!scala]rule(state)(currentColor)[/!]</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:25
msgid ""
"Each such information set contains 3 values. The first one is the rank of "
"the color to write on the ground. The second is the move to do, with the "
"following notation: 0=stop, 1=noturn, 2=left, 4=u-turn, 8=right. Note that "
"if the command is stop, you shouldn't even move forward on that step (but "
"you shouldn't stop your program either: the next steps can do something else "
"in a future state). Finally, the third integer is the next "
"<code>state</code> value to go into after this iteration."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:32
msgid ""
"Since these arbitrary notations are somehow difficult to remember, you "
"should define a set of constants that you should use instead of the direct "
"numerical values.  Their names could be NOTURN, LEFT, RIGHT and so on.  "
"[!scala]Just declare them using the keyword <code>val</code> instead of "
"<code>var</code>.  You should always use <code>val</code> instead of "
"<code>var</code> when possible anyway.[/!] [!java]The modifiers <code>final "
"static</code> before their type is the way to mark variables as constant in "
"Java.  You should write for example <code>static final int NOTURN=1;</code> "
"Sorry for the complexity of this notation. [/!] [!python]By convention, such "
"constant variables are written in upper case in python.  Technically, you "
"can still modify them, but that would be a very bad idea.[/!] You should "
"write them out of any method so that they are globally visible."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:44
msgid ""
"Using such constants greatly help making the code easier to read. Compare "
"the next two code chunks:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:46
#, no-wrap
msgid ""
"[!java]if (rule[state][currentColor][NEXT_MOVE] == LEFT) {[/!][!python]if "
"rule[state][currentColor][NEXT_MOVE] == LEFT:[/!][!scala]if "
"(rule(state)(currentColor)(NEXT_MOVE) == LEFT) {[/!]\n"
"    left()[!java];[/!]\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:49
msgid "This is much more easier to read (although longer) than the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:50
#, no-wrap
msgid ""
"[!java]if (rule[i][j][1] == 2) {[/!][!python]if rule[i][j][1] == "
"2:[/!][!scala]if (rule(i)(j)(1) == 2) {[/!]\n"
"    left()[!java];[/!]\n"
"[!java|scala]}[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:54
msgid ""
"Finally, you probably want to write a <code>elif</code> branch for the "
"<code>STOP</code> condition too. Having a <code>else</code> branch "
"displaying an error message such as \"unknown case\" is a good practice: it "
"makes your assumptions about your code more explicit, and you will get an "
"error message if they fall short. When doing so, the next problem is that "
"you have nothing to do in the <code>STOP</code> case, but python do not "
"allows you to write empty <code>elif</code> branches. You should use the "
"<code>pass</code> instruction as a placeholder: it says python that you have "
"a branch here, and that it does not contain anything."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:63
msgid ""
"You should probably use a [!java]switch case[/!][!scala]pattern matching[/!] "
"construct to keep your code readable.  If you can't remember what it is, "
"check <a href=\"plm://lessons.welcome/bdr.BDR2\">this exercise</a>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:69
msgid "Bibliographical notes"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/helloturmite/HelloTurmite.html:70
msgid ""
"According to wikipedia, turmites were invented independently by the end of "
"the eighties. It has been shown that turmites in general are exactly "
"equivalent in power to one-dimensional Turing machines with an infinite "
"tape, as either can simulate the other. This means that absolutely any "
"program that you can think of could theoretically be computed on this "
"device..."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:2
msgid "Creating Turmites"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:4
msgid ""
"This exercise allows you to build your own turmites. To pass the exercise, "
"you should simply write a <code>init()</code> method which initializes the "
"<code>rule</code> to use the following transitions table (from wikipedia), "
"set the buggle initial position at (8;33), and ask for 8342 steps."
msgstr ""

#. type: Content of: <table><tr><th>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:11
msgid "Current color"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:14 src/lessons/turmites/turmitecreator/TurmiteCreator.html:29 src/lessons/turmites/turmitecreator/TurmiteCreator.html:32 src/lessons/turmites/turmitecreator/TurmiteCreator.html:40 src/lessons/turmites/turmitecreator/TurmiteCreator.html:42 src/lessons/turmites/turmitecreator/TurmiteCreator.html:43
msgid "0"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:15 src/lessons/turmites/turmitecreator/TurmiteCreator.html:30 src/lessons/turmites/turmitecreator/TurmiteCreator.html:33 src/lessons/turmites/turmitecreator/TurmiteCreator.html:35 src/lessons/turmites/turmitecreator/TurmiteCreator.html:38 src/lessons/turmites/turmitecreator/TurmiteCreator.html:45
msgid "1"
msgstr ""

#. type: Content of: <table><tr><th>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:19 src/lessons/turmites/turmitecreator/TurmiteCreator.html:22
msgid "Write color"
msgstr ""

#. type: Content of: <table><tr><th>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:20 src/lessons/turmites/turmitecreator/TurmiteCreator.html:23
msgid "Turn"
msgstr ""

#. type: Content of: <table><tr><th>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:21 src/lessons/turmites/turmitecreator/TurmiteCreator.html:24
msgid "Next state"
msgstr ""

#. type: Content of: <table><tr><th>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:27
msgid "Current state"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:31 src/lessons/turmites/turmitecreator/TurmiteCreator.html:34
msgid "R"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:41 src/lessons/turmites/turmitecreator/TurmiteCreator.html:44
msgid "N"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:49
msgid ""
"where the direction to turn is one of <b>L</b> (90° left), <b>R</b> (90° "
"right), <b>N</b> (no turn) and <b>U</b> (180° U-turn)."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:51
msgid "Going further"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:52
msgid ""
"This exercise is naturally an excuse to let you experiment with your own "
"turmites.  Feel free to change the transition table and the amount of steps "
"to experiment by yourself. To that extend, you may find the Ed Pegg Jr's "
"library useful. If you find new interesting patterns, send them per email so "
"that we can integrate them to this list!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:58
msgid ""
"In addition, wikipedia is desperately missing some good looking colorful "
"turmites: only black and white ones are depicted.  You should consider "
"submitting your creations directly to the free encyclopedia."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:63
msgid ""
"Here are some 2-color turmites, extracted from "
"http://demonstrations.wolfram.com/Turmites/ [!python|scala]They are not "
"written using the [!thelang] syntax, but converting them should be easy.[/!]"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:67
#, no-wrap
msgid ""
"{{{1, RIGHT , 0}, {0, LEFT  , 0}}}  # 1: Langton's ant\n"
"{{{1, RIGHT , 0}, {0, NOTURN, 0}}}  # 2: binary counter\n"
"{{{0, LEFT  , 1}, {1, RIGHT , 1}}, {{1, NOTURN, 0}, {1, NOTURN, 1}}} # 3: "
"(filled triangle)\n"
"{{{0, NOTURN, 1}, {0, LEFT  , 1}}, {{1, RIGHT , 0}, {0, NOTURN, 1}}} # 4: "
"spiral in a box\n"
"{{{0, RIGHT , 1}, {0, LEFT  , 0}}, {{1, LEFT  , 1}, {0, RIGHT , 0}}} # 5: "
"stripe-filled spiral\n"
"{{{0, RIGHT , 1}, {0, LEFT  , 0}}, {{1, LEFT  , 1}, {1, NOTURN, 0}}} # 6: "
"stepped pyramid\n"
"{{{0, RIGHT , 1}, {0, NOTURN, 1}}, {{1, RIGHT , 1}, {1, LEFT  , 0}}} # 7: "
"contoured island\n"
"{{{0, RIGHT , 1}, {0, RIGHT , 1}}, {{1, NOTURN, 0}, {0, RIGHT , 1}}} # 8: "
"woven placemat\n"
"{{{0, RIGHT , 1}, {1, RIGHT , 1}}, {{1, LEFT  , 1}, {1, LEFT  , 0}}} # 9: "
"snowflake-ish\n"
"{{{1, LEFT  , 0}, {0, NOTURN, 1}}, {{0, LEFT  , 0}, {0, LEFT  , 1}}} # 10: "
"slow city builder\n"
"{{{1, LEFT  , 0}, {1, RIGHT , 1}}, {{0, RIGHT , 0}, {0, LEFT  , 1}}} # 11: "
"framed computer art\n"
"{{{1, LEFT  , 0}, {1, RIGHT , 1}}, {{0, RIGHT , 1}, {1, LEFT  , 0}}} # 12: "
"balloon bursting (makes a spreading highway)\n"
"{{{1, LEFT  , 1}, {0, LEFT  , 0}}, {{1, NOTURN, 0}, {0, NOTURN, 0}}} # 13: "
"makes a horizontal highway\n"
"{{{1, LEFT  , 1}, {0, LEFT  , 0}}, {{1, RIGHT , 1}, {1, RIGHT , 0}}} # 14: "
"makes a 45 degree highway\n"
"{{{1, LEFT  , 1}, {0, LEFT  , 1}}, {{1, RIGHT , 1}, {0, LEFT  , 0}}} # 15: "
"makes a 45 degree highway\n"
"{{{1, LEFT  , 1}, {0, NOTURN, 0}}, {{1, NOTURN, 0}, {1, RIGHT , 0}}} # 16: "
"spiral in a filled box\n"
"{{{1, LEFT  , 1}, {0, RIGHT , 0}}, {{0, LEFT  , 0}, {0, LEFT  , 0}}} # 17: "
"glaciers\n"
"{{{1, LEFT  , 1}, {1, LEFT  , 1}}, {{1, RIGHT , 1}, {0, NOTURN, 0}}} # 18: "
"golden rectangle!\n"
"{{{1, LEFT  , 1}, {1, RIGHT , 0}}, {{0, LEFT  , 0}, {0, LEFT  , 0}}} # 19: "
"fizzy spill\n"
"{{{1, LEFT  , 1}, {1, RIGHT , 1}}, {{1, NOTURN, 0}, {0, NOTURN, 1}}} # 20: "
"nested cabinets\n"
"{{{1, NOTURN, 1}, {0, LEFT  , 1}}, {{1, RIGHT , 0}, {1, NOTURN, 1}}} # 21: "
"(cross)\n"
"{{{1, NOTURN, 1}, {0, NOTURN, 0}}, {{0, RIGHT , 0}, {1, LEFT  , 0}}} # 22: "
"saw-tipped growth\n"
"{{{1, NOTURN, 1}, {0, NOTURN, 1}}, {{1, RIGHT , 1}, {0, NOTURN, 0}}} # 23: "
"curves in blocks growth\n"
"{{{1, NOTURN, 1}, {0, RIGHT , 0}}, {{0, LEFT  , 0}, {0, LEFT  , 0}}} # 24: "
"textured growth\n"
"{{{1, NOTURN, 1}, {0, RIGHT , 1}}, {{1, LEFT  , 0}, {1, RIGHT , 0}}} # 25: "
"(diamond growth)\n"
"{{{1, NOTURN, 1}, {1, LEFT  , 0}}, {{1, RIGHT , 1}, {0, NOTURN, 0}}} # 26: "
"coiled rope\n"
"{{{1, RIGHT , 0}, {0, LEFT  , 1}}, {{1, LEFT  , 0}, {0, NOTURN, 1}}} # 27: "
"(growth)\n"
"{{{1, RIGHT , 0}, {0, LEFT  , 1}}, {{1, LEFT  , 0}, {0, RIGHT , 1}}} # 28: "
"(square spiral)\n"
"{{{1, RIGHT , 0}, {1, RIGHT , 1}}, {{0, NOTURN, 0}, {0, NOTURN, 1}}} # 29: "
"loopy growth with holes\n"
"{{{1, RIGHT , 1}, {0, LEFT  , 1}}, {{1, NOTURN, 0}, {0, NOTURN, 0}}} # 30: "
"Lanton's Ant drawn with squares\n"
"{{{1, RIGHT , 1}, {0, RIGHT , 0}}, {{0, LEFT  , 1}, {1, LEFT  , 0}}} # 31: "
"growth with curves and blocks\n"
"{{{1, RIGHT , 1}, {0, RIGHT , 0}}, {{0, NOTURN, 0}, {1, RIGHT , 1}}} # 32: "
"distracted spiral builder\n"
"{{{1, RIGHT , 1}, {0, RIGHT , 1}}, {{1, NOTURN, 0}, {1, NOTURN, 1}}} # 33: "
"cauliflower stalk (45 deg highway)\n"
"{{{1, RIGHT , 1}, {1, LEFT  , 1}}, {{1, RIGHT , 1}, {0, RIGHT , 0}}} # 34: "
"worm trails (eventually turns cyclic!)\n"
"{{{1, RIGHT , 1}, {1, NOTURN, 0}}, {{1, NOTURN, 0}, {0, NOTURN, 1}}} # 35: "
"eventually makes a two-way highway!\n"
"{{{1, RIGHT , 1}, {1, RIGHT , 0}}, {{0, NOTURN, 0}, {0, NOTURN, 0}}} # 36: "
"almost symmetric mould bloom\n"
"{{{1, RIGHT , 1}, {1, RIGHT , 0}}, {{0, RIGHT , 0}, {1, NOTURN, 1}}} # 37: "
"makes a 1 in 2 gradient highway\n"
"{{{1, RIGHT , 1}, {1, RIGHT , 1}}, {{1, LEFT  , 1}, {0, RIGHT , 0}}} # 38: "
"immediately makes a 1 in 3 highway\n"
"{{{0, RIGHT , 1}, {1, RIGHT , 1}}, {{0, LEFT  , 2}, {0, LEFT  , 0}}, {{1, "
"RIGHT , 2}, {1, LEFT  , 0}}} # 39: squares and diagonals growth\n"
"{{{1, LEFT  , 1}, {0, NOTURN, 0}}, {{0, RIGHT , 2}, {1, LEFT  , 0}}, {{1, "
"RIGHT , 1}, {1, NOTURN, 0}}} # 40: streak at approx. an 8.1 in 1 gradient\n"
"{{{1, LEFT  , 1}, {0, NOTURN, 2}}, {{0, RIGHT , 2}, {1, NOTURN, 1}}, {{1, "
"RIGHT , 1}, {1, NOTURN, 0}}} # 41: streak at approx. a 1.14 in 1 gradient\n"
"{{{1, LEFT  , 1}, {1, LEFT  , 1}}, {{1, NOTURN, 0}, {0, NOTURN, 2}}, {{0, "
"LEFT  , 1}, {1, NOTURN, 1}}} # 42: maze-like growth\n"
"{{{1, LEFT  , 2}, {0, RIGHT , 0}}, {{1, LEFT  , 0}, {0, RIGHT , 0}}, {{0, "
"LEFT  , 0}, {0, LEFT  , 1}}} # 43: growth by cornices \n"
"{{{1, RIGHT , 0}, {0, RIGHT , 2}}, {{0, LEFT  , 0}, {0, RIGHT , 0}}, {{0, "
"NOTURN, 1}, {1, LEFT  , 0}}} # 44: makes a 1 in 7 highway\n"
"{{{1, RIGHT , 1}, {0, LEFT  , 0}}, {{1, RIGHT , 2}, {0, NOTURN, 0}}, {{1, "
"LEFT  , 0}, {0, LEFT  , 0}}} # 45: makes a 4 in 1 highway\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:114
msgid ""
"Langton's ants may not share the expressiveness power of the turmites, but "
"they remain fascinating too. You can experiment with them using the "
"initLangton() method, provided in your template, that allows to build a "
"Turmite transition table from a Langton's ant name. Tiny changes in the ant "
"may result huge changes. For example, \"RRL\" does not seem to lead to any "
"constructed pattern, even after a million steps, but \"RLL\" starts building "
"a very simple highway pattern after less than 100 steps!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:121
msgid ""
"Quite a lot of Langton's ants build highways: RL, of course, but also "
"RLRLRLLRLR (about 2500 steps).  The chaotic behavior of ants before the "
"highway can be very short (as with RLL that only need 100 steps to converge) "
"or very long, as with LLLLLLRRLRRR which seems chaotic for more than 500,000 "
"steps before build the highway or even RRLLLRRRLRRR which needs 1170000 to "
"start converging. Some are narrow, and others are very large, such as "
"RRLRLLRLRR (200,000 steps). This ant is also notable since it is somehow "
"squarish even before the highway start where most others do not show "
"anything notable before their highway."
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:129
msgid ""
"Some ants fill solid sectors, such as RRLLLRLLLRRR (16,000 steps), "
"RRLLLRLLLRRR (30,000 steps), RRLLLRRRRRLR (125,000 steps) or RRLRLLRRRRRR "
"(20,000 steps). Some even fill the whole space (RRLRR after 3000 "
"steps). Some of my personal favorite ones are the ones where the ant seem to "
"be bouncing within a box that gets bigger on each bump, such as LRRRRRLLR "
"(30,000 steps). LRRRRLLLRRR is even more impressing since the bounces within "
"the box are regular and since it converges more rapidly to its stable "
"behavior (15,000 steps are enough)."
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:136
msgid ""
"Finally, some ants are just build artistic patterns. You should check this "
"video for some beautiful ones: "
"http://www.youtube.com/watch?v=1X-gtr4pEBU. If you want to convert them into "
"your code, you have to shift them by one: For example, the one depicted at "
"3:42 is not RRLRLRLLRL, but RLRLRLLRLR (the first visible move should be "
"read as last one)."
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/turmites/turmitecreator/TurmiteCreator.html:141
msgid ""
"As you can see by exploring the above set of turmites, they are usually not "
"as colorful as the ants, but this may be because very few colors suffice to "
"exhibit complex behaviors. For example, there is a specific class of "
"turmites called <i>busy beavers</i> which are turmites that write a lot of "
"things before stopping (busy beavers are usually classical turing machines, "
"but the idea fits perfectly to turmites too). There is a sort of "
"international competition where people strive to find the turmite that "
"covers the biggest area before stopping. The web page is here: "
"http://code.google.com/p/ruletablerepository/wiki/TwoDimensionalTuringMachines"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/turmites/universe/TurmiteWorld.html:2
msgid "Turmite universe"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turmites/universe/TurmiteWorld.html:4
msgid ""
"This universe is very similar to the buggle one, but you will probably not "
"use all buggles methods.  So, this page only recap the buggle methods that "
"you will use."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/universe/TurmiteWorld.html:12
msgid ""
"[!java|c]void [/!][!c]stepForward()[/!][!java|python|scala]forward()[/!] or "
"[!java|c]void [/!]forward([!java|c]int [/!]steps[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/turmites/universe/TurmiteWorld.html:13
msgid ""
"[!java|c]void [/!][!c]stepBackward()[/!][!java|python|scala]backward()[/!] "
"or [!java|c]void [/!]backward([!java|c]int [/!]steps[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <h1>
#: src/plm/universe/sort/SortingWorld.html:2
msgid "Sorting World"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/sort/SortingWorld.html:3
msgid ""
"This world provides tools to experiment with the sorting algorithms. It can "
"be used in two different ways: the first one is naturally to write the "
"required sorting algorithms. But it is also possible to simply use the demo "
"mode of each exercise to observe the behavior of sorting algorithms. It "
"helps understanding the differences between each of them."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/sort/SortingWorld.html:9
msgid "Methods available to sorting algorithms"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:11
msgid "<b>Method</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:11
msgid "<b>Action</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:11
msgid "<b>Cost</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:12
msgid "[!java|c]int [/!]getValueCount() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:13
msgid "Returns the amount of values in the array"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:13 src/plm/universe/sort/SortingWorld.html:31
msgid "none"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:15
msgid ""
"[!java]boolean [/!][!c]int [/!]isSmaller([!java|c]int [/!]i[!scala]:Int[/!], "
"[!java|c]int [/!]j[!scala]:Int[/!]) [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:16
msgid ""
"Returns true if the content of cell i is strictly smaller than the one of "
"cell j"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:16
msgid "two reads"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:17
msgid ""
"[!java]boolean [/!][!c]int [/!]isSmallerThan([!java|c]int "
"[/!]i[!scala]:Int[/!], [!java|c]int [/!]value[!scala]:Int[/!])[!scala] "
":Boolean[/!]"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:18
msgid ""
"Returns true if the content of cell i is strictly smaller than the "
"<code>value</code>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:18 src/plm/universe/sort/SortingWorld.html:26
msgid "one read"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:20
msgid ""
"[!java|c]void [/!]swap([!java|c]int [/!]i[!scala]:Int[/!], [!java|c]int "
"[/!]j[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:21
msgid "Swaps the content of cell i and the one of cell j"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:21
msgid "two reads, two writes"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:22
msgid ""
"[!java|c]void [/!]copy([!java|c]int [/!]from[!scala]:Int[/!], [!java|c]int "
"[/!]to[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:23
msgid "Copy the content of cell 'from' into the cell 'to'"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:23
msgid "one read, one write"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:25
msgid "[!java|c]int [/!]getValue([!java|c]int [/!]idx[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:26
msgid "Returns the value of cell idx"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:27
msgid ""
"[!java|c]void [/!]setValue([!java|c]int [/!]idx[!scala]:Int[/!], "
"[!java|c]int [/!]value[!scala]:Int[/!])"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:28
msgid "Sets cell 'idx' to the <code>value</code>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:28
msgid "one write"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/plm/universe/sort/SortingWorld.html:30
msgid "[!java]boolean [/!][!c]int [/!]isSelected() [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/sort/SortingWorld.html:31 src/lessons/sort/pancake/universe/PancakeWorld.html:22 src/lessons/recursion/hanoi/universe/HanoiWorld.html:28
msgid "Returns whether the current world is selected in the graphical interface."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/sort/SortingWorld.html:35
msgid "History view"
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/sort/SortingWorld.html:36
msgid ""
"It is not enough to sort the array to pass the exercises. Your solution must "
"strictly follow the expected behavior of each exercise. This is enforced by "
"checking that your algorithm needs the same amount of read and write "
"operations to sort the array. When they don't match, understanding the "
"difference between your code and the expected solution can reveal very "
"difficult."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/sort/SortingWorld.html:43
msgid ""
"To help in this process, it is possible to graphically explore the history "
"of your sorting algorithm. Switch to the Objective view and use the "
"contextual menu (right click) to switch from the view of the current state "
"to the view of its history."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/sort/SortingWorld.html:48 src/lessons/sort/basic/bubble/AlgBubbleSort1.html:19
msgid ""
"The history view is a bit hairly at the first glance, but actually rather "
"simple: The time flows from left to right on this graph, and each row is a "
"cell of your array. The curved lines that go navigate between rows represent "
"a given data value. When two lines cross, this means that two values were "
"swapped at this time stamp; A line fork represent a value copy; When a value "
"is magenta and followed by an interrogation mark (?), it was read using "
"getValue(); If the value is red and followed with an exclamation point (!), "
"it was written using setValue()."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/sort/SortingWorld.html:57
msgid ""
"This view, inspired from Aldo Cortesi, reveals very helpful understand the "
"inner behavior of sorting algorithms."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/sort/basic/Main.html:2 src/lessons/sort/basic/short_desc.html:2
msgid "Sorting Algorithms"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/basic/Main.html:4
msgid ""
"This lesson allows to experiment with some classical sorting algorithms (and "
"some less common variant of them). The goal is two fold: you can first "
"better understand the idea of these algorithms by writing them yourself. But "
"even if you don't code the algorithms, you can use the demo mode to organize "
"\"races\" between these algorithms to experiment in practice what the "
"different asymptotical complexity mean."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/Main.html:11
msgid ""
"More exercises are planned for the future, on recursive sorting algorithms "
"(such as QuickSort and MergeSort) or using other microworlds to apply these "
"algorithms to other contexts."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/basic/Main.html:19
msgid ""
"Other graphical representations could be proposed, such as the ones "
"presented at <a href=\"http://sorting.at/\">http://sorting.at/</a>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/short_desc.html:4
msgid ""
"This lesson allows to experiment with some classical sorting algorithms (and "
"some less common variant of them :)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/short_desc.html:7 src/lessons/recursion/lego/short_desc.html:6 src/lessons/maze/short_desc.html:6
msgid "You are supposed to master the bases of programming to take this lesson."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:2
msgid "BubbleSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:4
msgid ""
"Welcome to the sorting universe. It allows you to experiment with the "
"existing sorting algorithms. The list of buildins that you can use in your "
"algorithms is available in the world reference documentation "
"(\"Help\"-&gt;\"About this world\")."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:8
msgid ""
"It is not enough to sort the array to pass the exercises. Your solution must "
"strictly follow the expected behavior of each exercise. This is enforced by "
"checking that your algorithm needs the same amount of read and write "
"operations to sort the array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:13
msgid ""
"When your algorithm diverges from the expectation, understanding the "
"difference between your code and the expected solution can reveal very "
"difficult. To help in this process, it is posible to graphically explore the "
"history of your sorting algorithm. Switch to the Objective view and use the "
"contextual menu (right click)  to switch from the the view of the current "
"state to the view of its history."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:28
msgid "First attempt at BubbleSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:30
msgid ""
"This first sorting algorithm is the most simple one: Bubble sort consists in "
"progressively moving up the smaller elements of the array, as if they were "
"air bubbles moving up to the surface of a liquid. The algorithm traverse the "
"array, and compare any pair of adjacent elements. If two adjacent elements "
"are wrongly sorted, they are swapped. Once the array was completely "
"traversed, the operation starts again from the beginning. When no elements "
"were sorted after a full traversal, it means that the array is completely "
"sorted: the algorithm can stop.  Bubble sort is studied because of its "
"simplicity, but it is almost never used in practice because of its bad "
"performance (O(n^2) on average)."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:40 src/lessons/sort/basic/bubble/AlgBubbleSort2.html:12
msgid "Show Tip (Pseudo-code)"
msgstr ""

#. type: Content of: <div><p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:41
msgid "The pseudo-code of the BubbleSort algorithm is the following:"
msgstr ""

#. type: Content of: <div><pre>
#: src/lessons/sort/basic/bubble/AlgBubbleSort1.html:42
#, no-wrap
msgid ""
"do: \n"
"        For each i in [0,len-2]\n"
"          If cells i and i+1 must be swapped, do it\n"
"while we swapped something during last traversal\n"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:2
msgid "BubbleSort (take 2)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:4
msgid ""
"If you look carefully at the behavior of BubbleSort, a first easy "
"optimization appears: after one traversal, the last element of the array "
"must be the biggest of all since the traversal moved it up like a bubble to "
"its position. More generally, after N traversal, we know that the N last "
"elements of the array are already sorted. It is thus not necessary to "
"compare them again during the subsequent traversals. For now, we will have "
"as many traversal as there is in the array."
msgstr ""

#. type: Content of: <div><p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:13
msgid "The pseudo-code of the BubbleSort2 algorithm is the following:"
msgstr ""

#. type: Content of: <div><pre>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:14
#, no-wrap
msgid ""
"For all i in [len-2,0] (traversing from biggest to smallest)\n"
"       For all j in [0, i]\n"
"          If cells j and j+1 must be swapped, do it\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:20
msgid ""
"When we run this algorithm, it is quite disappointing to see that it runs "
"approximately at the same speed than the basic version of BubbleSort. This "
"is a graphical effect only since only value changes are graphically "
"represented. Since this variation avoids some useless comparisons, it does "
"exactly the same amount of swaps that the basic version. It is thus quite "
"logical that the graphical interface draws this version at the same pace "
"than the base version. But the statistics on the amount of reads show that "
"we saved about the fourth of the amount of reads, which is not bad."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort2.html:29
msgid ""
"From the asymptotic complexity point of view, there is absolutely no "
"difference: this variation is still in O(n^2) on average (our gain is only "
"on the constant term, ignored when computing the asymptotic complexity)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:2
msgid "BubbleSort (take 3)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:4
msgid ""
"Let's now reintroduce the little optimization we removed at previous step: "
"if a traversal does not swap any element, it means that the array is already "
"sorted. In that case, we want to stop the whole sorting process."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:9
msgid ""
"[!java|python|c]For that, simply use the <code>break</code> keyword, which "
"breaks the current loop.  Beware, if you have several nested loops, this "
"will apply to the internal one.[/!] [!scala]For that, simply quit the "
"current function by calling <code>return</code> with no associated "
"value.[/!]"
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:14
msgid "If you want, this tip shows the pseudo-code."
msgstr ""

#. type: Content of: <div><pre>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:16
#, no-wrap
msgid ""
"For all i in [len-2,0] (traversing from biggest to smallest)\n"
"       For all j in [0, i]\n"
"          If cells j and j+1 must be swapped, do it\n"
"       If traversal on j did not swap anything, break the for loop\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/bubble/AlgBubbleSort3.html:23
msgid ""
"This optimization is even more disappointing: it only provide a gain of a "
"few percents on the amount of reads over BubbleSort2."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort1.html:2
msgid "CocktailSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort1.html:4
msgid ""
"To improve further the BubbleSort algorithm, we need to look closer its "
"behavior. One can notice that big elements are moved very quickly in "
"position while small ones move very slowly to their destination. They are "
"thus traditionally referred to as \"rabbits\" and \"turtles\" respectively "
"for big fast values and small slow ones."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort1.html:10
msgid ""
"To help the turtles moving faster, the cocktail sort traverse alternatively "
"the array from right to left and from left to right. Here is the "
"pseudo-code:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort1.html:15
#, no-wrap
msgid ""
"Do\n"
"  For all i in [0,len-2], do:\n"
"    if i and i+1 must be swapped, do it\n"
"  For all i in [len-2,0] (downward), do:\n"
"    if i and i+1 must be swapped, do it\n"
"while at least one of the traversal swapped an element\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort1.html:23
msgid ""
"One can see that cocktail sort achieves exactly the same amount of swaps "
"than the bubble sort, but improves slightly on read amount. It is however "
"still worse than BubbleSort2 to that extend."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort2.html:2
msgid "CocktailSort (take 2)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort2.html:4
msgid ""
"We will now apply to CocktailSort the same optimization than BubbleSort2 did "
"to BubbleSort. We must remember the limits of the array part not being "
"sorted yet, and traverse it alternatively from left to right and from right "
"to left:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort2.html:9
#, no-wrap
msgid ""
"beg=0; end=len-2\n"
"do\n"
"  For all Pour i in [beg,end], do:\n"
"      If cells i and i+1 must be swapped, do it    \n"
"  end -= 1 (this means end = end - 1)\n"
"  For all Pour i in [beg,end] (downwards), do:\n"
"      If cells i and i+1 must be swapped, do it    \n"
"  beg += 1 (this means beg = beg + 1)\n"
"while at least one of the traversal swapped an element\n"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort3.html:2
msgid "CocktailSort (take 3)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/cocktail/AlgCocktailSort3.html:4
msgid ""
"Even if the asymptotic complexity of CocktailSort2 is the same than the one "
"of BubbleSort, it seem to perform better in practice. It is even possible to "
"improve a bit further by stopping it if the first traversal didn't found "
"anything to swap, without achieving the downwards traversal. Likewise, we "
"can stop if the upward traversal found something to swap, but not the "
"downwards one."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:2
msgid "InsertionSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:5
msgid ""
"This sorting algorithm is quite simple to understand and write, even if it "
"is not as efficient as possible. Its asymptotic complexity is in O(n2), but "
"it is more efficient in practice (linear in best case, ie when the array is "
"already sorted, and N2/4 on average)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:10
msgid ""
"The idea is to traverse all elements of the array, and to insert each of "
"them into its proper position in the already sorted part of the array. When "
"we look at an element x, the situation is the following: any elements to the "
"left of the array are already sorted, and we have to insert x at its "
"position in the array."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:18
msgid "Once this is done, the situation is the following:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:22
msgid "The pseudo-code of this algorithm is thus the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:23
#, no-wrap
msgid ""
"For each i in [1,len-1]\n"
"  store the value of i in a variable v\n"
"  copy the cell i-1 into i if i-1 contains a value bigger than v\n"
"  copy the cell i-2 into i-1 if i-2 contains a value bigger than v\n"
"  copy the cell i-3 into i-2 if i-3 contains a value bigger than v\n"
"  copy the cell i-4 into i-3 if i-4 contains a value bigger than v\n"
"  ...\n"
"  copy v into the last cell copied above\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:33
msgid ""
"Naturally, you should use a loop to write the big permutation within the "
"given loop. Writing it this way would be really ... counter-productive."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:36
msgid ""
"If you've always wondered what computer science researchers do nowadays, "
"here is part of the answer: They improve fundamental algorithms so that "
"others can write efficient programs."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:40
msgid "Other variation of insertion sort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:42
msgid ""
"TreeSort builds a binary search tree to sort them. It leads to a O(n log(n))  "
"on average, but O(n^2) in worst cases. We won't study this algorithm here "
"since understanding its behavior requires to know what a binary tree is, "
"what is beyond our present goals."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:47
msgid ""
"There is other variations over the insertion sort, such as PatienceSort "
"which builds piles of values and sort each pile afterward. This algorithm "
"presents a 0(n log(n)) timing worst case and a 0(n) space "
"complexity. LibrarySort (proposed in 2004) also trades a bit space in "
"exchange for time since it provide a time complexity of O(n log(n)) but "
"needs to store some more data."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/insertion/AlgInsertionSort.html:54
msgid ""
"Wikipedia provides a detailled description of all these algorithms we cannot "
"present here because of time constraints."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/basic/shell/AlgShellSort.html:2
msgid "ShellSort"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/basic/shell/AlgShellSort.html:4
msgid ""
"This algorithm is named after its author, Donald Shell, who published it in "
"1959. It can be seen as an application of the CombSort idea (let elements "
"having a long path to travel take shortcuts) to the insertion sort (CombSort "
"is a variation of BubbleSort). Instead of comparing adjacent values during "
"the insertion sort, it compares values separated by a bigger gap. The bigger "
"the gap, the faster the elements are moved to their final destination, but "
"also the less precise is this move. It is thus mandatory to apply the "
"algorithm with a serie of decreasing gaps. At the last step, when the gap is "
"one, InsertionSort is used, but onto an array which is almost already sorted "
"by previous steps."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/shell/AlgShellSort.html:15
msgid ""
"Donald Shell propose <code>len/2</code> as initial value of the gap, and "
"then to divide it by 2 at each step. The pseudo-code is thus the following:"
msgstr ""

#. type: Content of: <p><pre>
#: src/lessons/sort/basic/shell/AlgShellSort.html:18
#, no-wrap
msgid ""
"gap=len/2\n"
"while gap>0:\n"
"  apply InsertionSort, comparing i-gap and i, then i-2gap and i-gap, then "
"i-3gap and i-2gap, etc.\n"
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/sort/basic/shell/AlgShellSort.html:23
msgid ""
"Just like in CombSort, the sequence of values taken by the gap is crucial "
"for Shell sort performance. In some rare pathological cases, the sequence we "
"used above can lead to a O(n^2) performance. Other sequences were proposed: "
"the Hibbard's increments of 2k − 1 lead to a complexity of O(n^(3/2)) in "
"worst cases. Pratt's increments 2^i3^j lead to a O(nlog(n)log(n) performance "
"in worst cases. The existance of a sequence leading to a O(n log(n)) was "
"precluded by Poonen, Plaxton, and Suel. Thanks to this performance, "
"ShellSort is a valid candidate for array of several hundred thousands when "
"correctly implemented."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/sort/basic/shell/AlgShellSort.html:33
msgid ""
"In our case, the array are ways too small to benefit of these "
"optimizations. If you ever need to do so, take as initial gap the biggest "
"value of the targeted serie still smaller than the array size, and then use "
"decreasing values of the serie."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/sort/basic/shell/AlgShellSort.html:38
msgid ""
"Interestingly enough, determining the best gap sequence for shell sort turns "
"into a research issue of our century in computer science. For example, an "
"article of 2001 introduces the following sequence, which seems to be optimal "
"in practice for arrays of size up to 10^5: {1, 4, 10, 23, 57, 132, 301, 701, "
"1750} (Marcin Ciura, Best Increments for the Average Case of Shellsort, 13th "
"International Symposium on Fundamentals of Computation Theory, LNCS 2001; "
"Vol. 2138)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:2
msgid "Selection Sort"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:4
msgid ""
"In this exercise we will implement another classical algorithm: selection "
"sort."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:7
msgid ""
"The idea is simply to select for each cell of the array the smallest value "
"from the part not already sorted. Thus for the first cell, it takes the "
"smallest value over the whole array. For the second one, it takes the second "
"smallest value, which is the smallest value from the cell not already "
"sorted. You of course don't have to sort the last cell of the array, that is "
"already sorted when you consider it."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:14
msgid ""
"More generally, for the cell N, it looks the cell M in [N;len] containing "
"the smallest possible value of the interval. Then, it swaps the content of "
"cell N with the one of cell M."
msgstr ""

#. type: Content of: <p><p><h2>
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:18
msgid "Existing variations"
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/sort/basic/selection/AlgSelectionSort.html:19
msgid ""
"Another classical algorithm which idea is based on the selection of good "
"elements is HeapSort, but it uses a heap data structure which we did not see "
"yet. Simply remember that HeapSort provides a O(n log n) performance in "
"worst case, which is why it is a very interesting algorithm in practice."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/comb/AlgCombSort.html:2
msgid "CombSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort.html:4
msgid ""
"We saw that CocktailSort improve a bit for turtles (i.e. small values near "
"to the end of the array), but it is still possible to achieve "
"better. ComboSort comes down to providing them a short cut: instead of "
"comparing adjacent values, we compare values separated by a gap bigger than "
"1. That way, turtles will traverse <i>gap</i> cells at each "
"traversal. Naturally, we have to apply the algorithm with decreasing gaps, "
"and finish with <i>gap=1</i> to ensure that the array is correctly sorted "
"afterward. Choosing the right gap and how to decrease it is a difficult "
"question, but in practice, dividing it by 1.3 after each traversal leads to "
"good performance. Here is the corresponding pseudo-code:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/comb/AlgCombSort.html:16
#, no-wrap
msgid ""
"gap = len;\n"
"do\n"
"   if gap>1 then\n"
"     gap = gap / 1.3\n"
"   i = O\n"
"   while i+gap &lt; len do:\n"
"     if i and i+gap must be swapped, do it\n"
"     increase i by one\n"
"while the gap is bigger than 1 or the last traversal swapped at least one "
"pair\n"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/basic/comb/AlgCombSort.html:27 src/lessons/maze/island/IslandMaze.html:67 src/lessons/welcome/bat/bool1/Max1020.html:6
msgid "[!scala]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort.html:27
msgid ""
"One tricky part is that we want to divide gap, that is an integer (of type "
"Int), by 1.3, that is a Double.  The type system of scala won't let us do "
"this, because such discrepancy usually denotes a programmer error.  As this "
"is not an error this time, we have to convert gap to Double for the time of "
"the operation, and then convert the result back to Int to store it into "
"gap. This should be written this way:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/comb/AlgCombSort.html:31
#, no-wrap
msgid "gap = (gap.asInstanceOf[Double] / 1.3).asInstanceOf[Int]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort.html:32
msgid ""
"This is rather verbose, but actually, this notation is not very complex. And "
"remember that the type checker is your friend. It's picky and sometimes "
"annoying (as on this one), but it often catches weird bugs that would have "
"been a pain to debug if not catch by the type checker. And since the Scala's "
"authors are pragmatic, the previous expression can be simplified:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/basic/comb/AlgCombSort.html:36
#, no-wrap
msgid "gap = (gap.toDouble / 1.3).toInt"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort.html:37
msgid ""
"<code>toDouble</code> and <code>toInt</code> are just shortcuts for the "
"corresponding expressions <code>asInstanceOf[Double]</code> and "
"<code>asInstanceOf[Int]</code>. It's not very generic, but it's very handy."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort.html:41
msgid ""
"This algorithm was invented by Wlodek Dobosiewicz in 1980, and later "
"rediscovered and popularized by Stephen Lacey and Richard Box, who described "
"it in Byte Magazine in April 1991."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/comb/AlgCombSort11.html:2
msgid "CombSort11"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/comb/AlgCombSort11.html:4
msgid ""
"The authors of this algorithm observed that the performance is increased if "
"we make sure that the last values of the gap are (11, 8, 6, 4, 3, 2, 1)  "
"rather than (9, 6, 4, 3, 2, 1) or (10, 7, 5, 3, 2, 1). Rework the code of "
"CombSort to ensure just after the gap update that if it is 9 or 10, we "
"should use 11 instead."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/basic/gnome/AlgGnomeSort.html:2
msgid "GnomeSort"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/gnome/AlgGnomeSort.html:4
msgid ""
"The Gnome sort is similar to insertion sort, but the elements are moved in "
"position by a serie of swaps just like in bubble sort. It is named after the "
"supposed behavior of garden gnomes when they sort flower pots. Here is a "
"description of the algorithm by its author:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/basic/gnome/AlgGnomeSort.html:9
msgid ""
"Gnome Sort is based on the technique used by the standard Dutch Garden Gnome "
"(Du.: tuinkabouter). Here is how a garden gnome sorts a line of flower "
"pots. Basically, he looks at the flower pot next to him and the one "
"immediately after ; if they are in the right order he steps one pot forward, "
"otherwise he swaps them and steps one pot backwards. Boundary conditions: if "
"there is no previous pot, he steps forwards; if there is no pot next to him, "
"he is done.  <i>—Dick Grune</i>"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/dutchflag/Main.html:2 src/lessons/sort/dutchflag/short_desc.html:2 src/lessons/sort/dutchflag/DutchFlagAlgo.html:2 src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:2
msgid "The Dutch Flag Problem"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/Main.html:4
msgid ""
"This problem was first proposed by E.W Dijkstra in 1976 (in the chapter 14 "
"of his book \"A Discipline of Programming\").  It is a very classical "
"variation of the sorting algorithms since then. It is sometimes useful in "
"real life, but it became famous for its pedagogical properties: its "
"complexity is not trivial, but not complex either.  It can easily be "
"formally proven, but it's not absolutely trivial either."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/dutchflag/Main.html:13
msgid "A temporal view could be welcomed."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/dutchflag/Main.html:14
msgid ""
"Other exercises, for example with 2 colors only or with more than 3 colors, "
"could generalize the proposed approach."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/dutchflag/Main.html:15
msgid "This problem could be solved recursively."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/short_desc.html:4
msgid ""
"This is a classical sorting problem, constituting a variation over the "
"insertion sort."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:4
msgid ""
"Your work is to sort all the colors of the Dutch flag, and the only provided "
"primitive is to exchange two given lines.  In addition, you should not "
"create any additional variables (but a few indices)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:7
msgid ""
"If you think carefully, this can be done in linear time, where you sort a "
"line at each iteration of the loop.  You may want to check again the <a "
"href=\"plm://lessons.sort.basic/insertion.AlgInsertionSort\">insertion "
"sort</a>, of which the Dutch Flag sort is a variation. The main difference "
"is that you have 3 insertion points, not only one..."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:11
msgid "I need an hint to start"
msgstr ""

#. type: Content of: <div>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:12
msgid "Do a traversal over your data, saving 3 indices:"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:14
msgid ""
"<code>afterBlue</code> is initialized to 0. Make sure that every cell below "
"<code>afterBlue</code> is filled with blue elements."
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:15
msgid ""
"<code>whiteRed</code> is initialized to size-1. Make sure that every cell "
"after <code>whiteRed</code> is filled with red elements."
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:16
msgid ""
"<code>beforeWhite</code> is initialized to size-1. Make sure that every cell "
"after <code>beforeWhite</code> and before <code>whiteRed</code> is filled "
"with white elements."
msgstr ""

#. type: Content of: <div>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:18
msgid ""
"Note that the unsorted cells are always between <code>afterBlue</code> and "
"<code>beforeWhite</code>."
msgstr ""

#. type: Content of: <div>
#: src/lessons/sort/dutchflag/DutchFlagAlgo.html:20
msgid ""
"At each step of your traversal, check the color of the cell at "
"<code>afterBlue</code> and do the required exchanges.  The loop ending "
"condition is when <code>afterBlue</code> becomes larger than "
"<code>beforeWhite</code>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:4
msgid "Provided values"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:6
msgid ""
"The colors are represented through the following constants: BLUE, WHITE and "
"RED.  You can use them directly in your code."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:9 src/lessons/lander/universe/DelegatingLanderWorld.html:8
msgid "Provided functions"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:11
msgid "This world is very simple, with only 5 provided functions."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:13
#, no-wrap
msgid ""
"[!java|c]void [/!]swap([!java|c]int [/!]x[!scala]:Int[/!], [!java|c]int "
"[/!]y[!scala]:Int[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:14
msgid "Swap the lines number <code>x</code> and <code>y</code>."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:16
#, no-wrap
msgid "[!java|c]int [/!]getSize() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:17
msgid "Returns the amount of lines on this flag."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:19
#, no-wrap
msgid ""
"[!java|c]int [/!]getColor([!java|c]int [/!]line[!scala]:Int[/!])  "
"[!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:20
msgid "Returns the color of the given line."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:22 src/lessons/sort/baseball/universe/BaseballWorld.html:31
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isSorted()  [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:23
msgid "Returns whether the flag is sorted."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:25 src/lessons/sort/baseball/universe/BaseballWorld.html:37
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isSelected()  [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/dutchflag/universe/DutchFlagWorld.html:26 src/lessons/sort/baseball/universe/BaseballWorld.html:38
msgid "Returns whether the current world is selected in the interface."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:2
msgid "PancakeWorld"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:4
msgid "This universe is very simple, with only five functions provided."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:6
#, no-wrap
msgid "[!java|c]int [/!]getStackSize()  [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/pancake/universe/PancakeWorld.html:7
msgid "Returns the size of the stack, that is the amount of pancakes it contains."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:9
#, no-wrap
msgid ""
"[!java|c]int [/!]getPancakeRadius([!java|c]int [/!]rank[!scala]:Int[/!])  "
"[!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/pancake/universe/PancakeWorld.html:10
msgid ""
"Returns the radius of the pancake passed as argument, with the rank of the "
"top-most pancake being 0."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:12
#, no-wrap
msgid ""
"[!java]boolean [/!][!c]int [/!]isPancakeUpsideDown([!java|c]int "
"[/!]rank[!scala]:Int[/!])   [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/pancake/universe/PancakeWorld.html:13
msgid ""
"Returns whether the pancake passed as argument upside-down, that is, if its "
"burned side is on top. As usual, the top-most pancake is of rank 0."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:15
#, no-wrap
msgid "[!java|c]void [/!]flip([!java|c]int [/!]amount[!scala]:Int[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/pancake/universe/PancakeWorld.html:16
msgid ""
"Flips the <code>amount</code> first pancakes composing the stack, from the "
"top of it."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:18
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isSorted()   [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/pancake/universe/PancakeWorld.html:19
msgid "Returns whether the pancake stack is correctly sorted."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/universe/PancakeWorld.html:21
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isSelected()   [!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/Main.html:2 src/lessons/sort/pancake/BasicPancake.html:2
msgid "Pancake Sorting"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:4
msgid ""
"This activity is inspired by a problem first introduced in 1975 by Harry "
"Dweighter in the American Mathematical Monthly. The question is not only to "
"sort the pancakes, but to determine <code>f(n)</code> the <i>minimal</i> "
"amount of flips mandated to sort any stack of size <code>n</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:8
msgid ""
"This problem is now famous because Bill Gates authored (with "
"C. Papadimitriou) his only scientific publication in 1979 on this topic, "
"providing a faster algorithm and proving that <code>17n/16 ≤ f(n) ≤ "
"(5n+5)/3</code>.  This was the only publication of Bill Gates before he "
"invented Windows and became rich."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:12
msgid ""
"Then, David X. Cohen, the inventor of the Futurama comics with many "
"mathematical references, introduced the variant with burnt pancakes and "
"studied its complexity with Manuel Blum in 1993."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:15
msgid ""
"An article of 2012 (by L. Bulteau, G. Fertin and I. Rusu) proved that "
"determining the minimal amount of flips to sort the stack is a NP-complete "
"problem. Naturally, the stack sorting problem is not NP-complete since it "
"can be solved in 2n-3 steps with the naive algorithm and (5n+5)/3 steps with "
"the Gates algorithm.  That's determining the minimal amount of steps that is "
"NP."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:20
msgid "Further information can be found on the wikipedia page, as usual."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/Main.html:23
msgid ""
"This activity is also integrated to CSIRL (my repository of <i>free</i> "
"unplugged activities to introduce computer science, available at "
"http://www.loria.fr/~quinson/Mediation/SMN/), and it may be interesting to "
"run the unplugged activities before implementing these algorithms in PLM."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/Main.html:34
msgid "A temporal view similar to the sorting universe could be helpful"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/Main.html:35
msgid ""
"Other exercises, for example on the Roti sorting, with a pile of Roti that "
"have to touch the grill on each face (see "
"http://en.wikipedia.org/wiki/Pancake_sorting#The_identical_pancake_stack)."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/sort/pancake/short_desc.html:2
msgid "The pancake problem"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/short_desc.html:4
msgid "Help the poor psychorigid pancakes' chef to sort its pancake stack!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/short_desc.html:6
msgid ""
"This funny problem leads to algorithms that are somewhat more challenging to "
"implement. You are supposed to master the bases of programming and some "
"sorting algorithms to take this lesson."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BasicPancake.html:4
msgid ""
"The pancake sorting problem is a simple puzzle where you have a set of "
"pancakes, each of differing size. The chef cooking the pancake is a bit "
"psychorigid: he hates when the pancakes are not correctly sorted on the "
"plate. He loves when they are correctly ordered, with the small ones over "
"the larger ones. As every pancake maker, he masters the pancake flipping "
"with his spatula. He can flip the pancake on top of the stack, or even "
"several pancakes at once. The thing is that he has only one plate and the "
"table is too dirty to place pancakes on it, even temporary. The only allowed "
"operation is to flip some pancakes that are on top of the stack."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BasicPancake.html:13
msgid ""
"Your work is to help this poor guy sorting his stack by flipping the "
"pancakes. Each pancake is defined by its radius and rank within the stack, "
"with the top-most pancake is at rank 0, and the one below at rank 1."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BasicPancake.html:17
msgid ""
"Note that you can play physically with pieces of paper or wood at first to "
"get the grasp on this problem. This is even one of the activities that I use "
"in my CS-IRL (computer science in real life) project to introduce the "
"concept of algorithm to absolute beginners that wonder about our "
"science. More information at http://www.loria.fr/~quinson/Mediation/SMN/ (in "
"French)."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/sort/pancake/BasicPancake.html:23 src/lessons/sort/pancake/BubblePancake.html:10
msgid "I don't get it. I need some help."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/BasicPancake.html:24
msgid ""
"You should try to first move the largest pancake to the bottom, and then the "
"largest but one pancake on top of it, and then the one just smaller on top, "
"and so on."
msgstr ""

#. type: Attribute 'alt' of: <p><p><div>
#: src/lessons/sort/pancake/BasicPancake.html:28 src/lessons/sort/pancake/BubblePancake.html:13
msgid "The first tip was not enough. I need another one."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/BasicPancake.html:29
msgid "So first, you need to move the largest pancake at the bottom of the stack."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/BasicPancake.html:30
msgid ""
"Can you imagine a situation in which you can easily bring this damn large "
"pancake to the bottom?"
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/BasicPancake.html:31
msgid "How could you reach this situation from the current one?"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/BubblePancake.html:2
msgid "Bubble Pancakes"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BubblePancake.html:4
msgid ""
"This problem is similar to the previous: you have to sort the pancakes, the "
"smallest at the top and the biggest at the bottom, except you can only flip "
"them to sort."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BubblePancake.html:6
msgid ""
"The purpose here is to sort them using the bubble algorithm, where one "
"pancake is moved to the bottom until it encounters a bigger one. In "
"graphical representations, it looks like a bubble takes the element and move "
"them through the pile. This is where its name comes from."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BubblePancake.html:8
msgid ""
"Now, using pancakes makes it a little more difficult to write, because you "
"have to find a way to swap only two pancakes at a time."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/BubblePancake.html:11
msgid ""
"The bubble algorithm consists in browsing the whole pile from top to bottom, "
"and making a comparision between two pancakes. Each time the top pancake is "
"bigger than the one below, you have to swap them, then compare the bigger "
"pancake you just swapped with one below, and so on. You have to browse "
"through the entire pile until no swap has occurred, in which case the pile "
"is sorted."
msgstr ""

#. type: Content of: <p><p><div>
#: src/lessons/sort/pancake/BubblePancake.html:14
msgid ""
"If you don't understand the basic bubble sorting algorithm, you should try "
"the exercises within the “Sorting algorithms” lesson. If you do, but can't "
"figure a way to swap only two pancakes at a time, think of a situation where "
"only two pancakes are swapped at a time, and find a way to reach that "
"situation."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/BurnedPancake.html:2
msgid "Burned Pancakes"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/BurnedPancake.html:4
msgid ""
"Hard blow for the chef! The pancakes got burnt on one side! There is no way "
"he can deliver a stack of pancakes with visibly burnt pancakes! You've got "
"to help him ensuring that no pancake is upside-down while sorting his stack."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/GatesPancake.html:2
msgid "Faster Pancake Sorting"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/GatesPancake.html:4
msgid ""
"Unlike others sorting problem, the expensive operation is not the comparison "
"of values, but the flipping of pancakes. In this exercise, we will explore "
"another algorithm that attempt to reduce the amount of stack flipping. The "
"funny side is that this algorithm was first introduced by Bill Gates, before "
"invented Windows."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/GatesPancake.html:9
msgid ""
"The basic idea is to grow sequences of sorted pancakes, not necessarily "
"starting from the bottom.  We say that a sequence of ordered pancakes "
"constitute a <b>block</b> while a pancake that is not part of a block is "
"said to be <b>free</b>. The algorithm then considers the topmost pancake (of "
"radius <code>t</code>) and search for the <code>t+1</code> or "
"<code>t-1</code> pancakes (the considered neighbor is noted "
"<code>t+o</code>). Eight cases may happen:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:16
msgid ""
"<b>Case a</b>: Both <code>t</code> and <code>t+o</code> are free. They are "
"then merged in one flip."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:20
msgid ""
"<b>Case b</b>: <code>t</code> is free, and <code>t+o</code> is the first of "
"a block. They are merged in one flip."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:25
msgid ""
"<b>Case c</b>: <code>t</code> is free but both <code>t-1</code> and "
"<code>t+1</code> are the last elements of blocks.  Both blocks and "
"<code>t</code> are merged all together in 4 flips.  Beware, if either "
"<code>t-1</code> or <code>t+1</code> does not exist (because <code>t</code> "
"is 0 or max), only two flips are mandated."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:33
msgid ""
"<b>Case d</b>: <code>t</code> is in a block but <code>t+o</code> is "
"free. They are merged in one flip."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:38
msgid ""
"<b>Case e</b>: <code>t</code> is in a block and <code>t+o</code> is the "
"first element of a block. They are merged in one flip."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:42
msgid ""
"<b>Case f</b>: <code>t</code> is in a block and <code>t+o</code> is the last "
"element of another block.  They are merged in 3 flips as follows."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:46
msgid ""
"<b>Case g</b>: <code>t</code> is in a block of length k+1 (the last element "
"is <code>t+ko</code>), <code>t+(k+1)o</code> is either free or the last "
"element of another block. Both blocks are merged in 2 flips:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:49
msgid ""
"<b>Case h</b>: <code>t</code> is in a block of length k+1 (the last element "
"is <code>t+ko</code>), <code>t+(k+1)o</code> is the first element of another "
"block (the difference with case g is that <code>t+(k+1)o</code> is now the "
"<i>first</i> element of its block). Both blocks are merged in 2 flips:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/GatesPancake.html:55
msgid ""
"<b>Case i</b>: <code>t</code> is in a block of length <code>n</code> (this "
"block contains all pancakes).  If <code>t</code> is not 1, the whole stack "
"is fliped. The algorithm then stops."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/GatesPancake.html:58
msgid ""
"Each iteration increases the size of the blocks, so the algorithm eventually "
"halts in all cases. A finer analysis would show that it takes at most "
"<code>(5n+5)/3</code> steps to sort the stack. That's better than the naïve "
"algorithm, that requires 2n-3 steps."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/pancake/GatesPancake.html:61
msgid "Your turn"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/GatesPancake.html:62
msgid ""
"You now have almost enough information to implement this algorithm on your "
"own. We just have to remove the last remaining ambiguities to ensure that "
"you implement exactly the same algorithm that the correction. If several "
"cases apply to your situation, then you should use the first given one. For "
"example, if both cases a and b apply (e.g., with <code>t-1</code> on case "
"<b>a</b> and <code>t+1</code> on case <b>b</b>), then you should apply the "
"flips of case <b>a</b>. If a given case applies for both <code>t+1</code> "
"and <code>t-1</code>, then you should apply it to <code>t+1</code>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/GatesPancake.html:68
msgid ""
"Note that it is somehow harder than the other exercises we did so far, so "
"don't be surprised if you need more time to achieve this.  But do not give "
"up hope, you can do it!"
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/sort/pancake/GatesPancake.html:71
msgid "Well, I need some help to start."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/GatesPancake.html:72
msgid ""
"First write some helper functions such as <code>isFirst()</code> or "
"<code>isFree()</code>. This will simplify your main algorithm afterward, "
"that can be written very similarly to the explication above with a bunch of "
"if conditions. Factorizing code this way often helps making your code more "
"readable."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/sort/pancake/GatesPancake.html:79
msgid "My code keeps failing and I don't know how to debug it."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/GatesPancake.html:80
msgid ""
"To debug one world after the other and avoid that the messages of all worlds "
"get intermixed, you can write your debug function only if the method "
"<code>isSelected()</code> returns true. It will be so only for the entity "
"that is currently selected in the graphical interface, that is probably the "
"world you are currently debugging. This will help breaking the difficulty in "
"parts by debugging the situation one after the other."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/GatesPancake.html:86
msgid ""
"In particular, it may help to print textually the state of the world each "
"time you enter the main loop."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/pancake/CohenPancake.html:2
msgid "Faster Burned Pancake Sorting"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:4
msgid ""
"The Gates' algorithm that we saw in the previous exercise quickly sort a "
"stack of unburned pancakes by increasing the size of the blocks of sorted "
"pancakes. This is much faster that the naive algorithm which moves at each "
"step the largest pancake to the bottom of still unsorted pancakes. Gates' "
"algorithm manages to sort a stack of <i>n</i> pancakes in less than <i>(5n + "
"5)/3</i> steps in the worst case, while the naive algorithm requires at most "
"<i>2n</i> steps. Gates is thus about one third faster in the worst case."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:11
msgid ""
"In this exercise, we will explore an adaptation of the same idea to burnt "
"pancakes. This was first published by David X. Cohen and Manuel Blum. David "
"Cohen co-founded a few years later the Futurama TV show full of mathematical "
"jokes. Definitively, interesting people studied that little pancake "
"problem..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:16
msgid ""
"The Cohen's algorithm is slightly easier than the Gates' one since it "
"distinguishes less cases:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:18
msgid ""
"<b>Case 1:</b> At least one pancake is rightside up in the stack. Let "
"<i>p</i> be the largest such pancake.  Note that <i>p + 1</i> must therefore "
"be upside down, unless <i>p = n</i> (in which case there is no <i>p + 1</i> "
"pancake)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:22
msgid "<b>Case 1.a:</b> <i>p+1</i> is lower in the stack than <i>p</i>."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:23
msgid "<b>Case 1.b:</b> <i>p+1</i> is higher in the stack than <i>p</i>."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:24
msgid ""
"<b>Case 1.c:</b> There is no <i>p+1</i> because <i>p</i> is the largest "
"pancake in stack, that is because <i>p = n</i>.  If pancake <i>p</i> is "
"already in position, there is nothing to do. If not, you can move it to the "
"bottom of the stack in 2 flips:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:28
msgid ""
"<b>The trick is that the pancake <i>p</i> should never be considered "
"again.</b> Otherwise, you will consider that pancake again and again since "
"it's rightside up, and since that's the largest pancake. To leave that "
"pancake alone, you should keep track of the stack size that is still to be "
"sorted. Any traversal of the stack must then only consider these pancakes, "
"leaving alone the ones that are already in position at the bottom of the "
"stack."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:36
msgid ""
"<b>Case 2:</b> All pancakes are downside. Again, we distinguish two "
"sub-cases."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:39
msgid ""
"<b>Case 2.a:</b> There is at least one <i>p</i> for which <i>p+1</i> is "
"higher than <i>p</i> (if there is several such <i>p</i>, take the largest "
"one)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/pancake/CohenPancake.html:43
msgid ""
"<b>Case 2.b:</b> Any pancake <i>p</i> is lower than pancake <i>p+1</i>. In "
"that case, we must have that setting:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:48
msgid ""
"As you can see, we achieve one join in 2 flips in the cases 1 or 2.a. Since "
"we need to achieve n joins to sort the stack, we can sort the stack in "
"<i>2n</i> steps if case 2.b does not occurs."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:51
msgid ""
"That case 2.b requires a very different handling as it is obviously not "
"possible to achieve a join in only 2 flips.  But fortunately, we can "
"leverage the very specific setting of the stack in that case to provide the "
"following algorithm.  It sorts a stack in that exact configuration after "
"exactly <i>2n</i> steps."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/pancake/CohenPancake.html:56
#, no-wrap
msgid ""
"Repeat n times\n"
"    Flip the whole stack of n pancakes\n"
"    Flip the top (n-1) pancakes\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:61
msgid ""
"It may sound somehow magic, but it actually works, as depicted on an example "
"below."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/pancake/CohenPancake.html:65
msgid ""
"So, all in all, the Cohen algorithm manages to sort the stack of burnt "
"pancakes in <i>2n</i> steps in all cases.  Quite a win over the naive "
"algorithm for burnt pancakes that requires <i>3n</i> steps."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/sort/pancake/CohenPancake.html:68
msgid "I cannot get it right."
msgstr ""

#. type: Content of: <p><div>
#: src/lessons/sort/pancake/CohenPancake.html:69
msgid ""
"Don't worry. This exercise is very difficult, so it's ok if it does not work "
"right away for you.  Add some relevant logging to your code to understand "
"where it stop performing correctly.  Make sure to use the method "
"<code>isSelected()</code> so that your logs only appears in the currently "
"displayed world. In particular, it may help to print textually the state of "
"the world each time you enter the main loop."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/Main.html:2
msgid "The Rainbow Baseball Game"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/Main.html:4
msgid ""
"This activity is inspired from the orange game, from the \"Computer Science "
"Unplugged\" activities repository.  It was however heavily since then, first "
"for the CSIRL (my repository of <i>free</i> unplugged activities to "
"introduce computer science, available at "
"http://www.loria.fr/~quinson/Mediation/SMN/) and now for PLM."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/Main.html:8
msgid ""
"In the literature, the generalized form of this problem is known as the "
"pebble motion problem (the bases can be connected by any kind of graph, and "
"the affinity of pebbles with bases may be different). Another variant of "
"this problem is the well known 15-puzzle, with one player per base, and a "
"two dimensional square grid. Much more information about these problems can "
"be found on wikipedia, as usual."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/sort/baseball/Main.html:13
msgid ""
"How do you know that the naive algorithm won't loop on that initial "
"situation?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/Main.html:15
msgid ""
"Well, we simply tested all possible situations to see when this algorithm "
"loops and when it finds the correct solution. We found that it works for all "
"situations where no player is at home (there is 84 such situations for 4 "
"bases, once you take the symmetries into account). It obviously works for "
"some situations that do not respect this criteria (such as all situations it "
"encounters from one of those 84 boards to the final state), but that's "
"another story. Having such a criteria allows us to generate pseudo-random "
"initial situations for the first exercise for which the algorithm we propose "
"is guarenteed to work."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/Main.html:22
msgid ""
"We also explored bigger instances of the problem, and unfortunately, we have "
"no such criteria for them.  With 5 bases, the algorithm wrongly loops for 24 "
"of the 1824 possible boards where no player is home (that's 1.31%).  With 6 "
"bases, it fails on 1251 of the 58860 such boards (2.12%). With 7 bases, it "
"fails for 84444 out of 2633940 (that's 3.2%). I am still looking for a "
"criteria ensuring that the algorithm won't loop. If you discover one, please "
"report it. Ideally, it would be simple to enforce manually so that we can "
"use it during our unplugged activities."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/baseball/Main.html:32
msgid ""
"Other graphical representations could be proposed, such as a linear one (for "
"the existing exercises) or other ones (such as a grid or a tree, if an "
"exercise on this kind of graph proves interesting)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/sort/baseball/Main.html:34
msgid ""
"Other exercises on other algorithms on this variant, or on other variants "
"such as the 15-puzzle."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/sort/baseball/short_desc.html:2
msgid "Rainbow baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/short_desc.html:4
msgid ""
"This is another funny variation on the sorting problem, adapting the main "
"sorting algorithms on an unusual context."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:2
msgid "Rainbow Baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:3
msgid ""
"The colors are represented by integers, between <code>0</code> and "
"<code>amount of bases -1</code>.  The hole is represented by the special "
"value <code>-1</code>.  The color of each base is its rank. So base "
"<code>1</code> is of color <code>1</code>.  In the graphical interface, the "
"base <code>0</code> is the dark blue one while the base <code>1</code> is "
"the fuscia one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:9
msgid ""
"Once every players on the field are in their home base, the hole should be "
"in the last base, that is of rank <code>getBasesAmount()-1</code>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:12
msgid "Functions to retrieve the world's dimensions"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:14
#, no-wrap
msgid "[!java|c]int [/!]getBasesAmount() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:15
msgid "Returns the amount of bases on this field."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:17
#, no-wrap
msgid "[!java|c]int [/!]getPositionsAmount() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:18
msgid "Returns the amount of player's positions per base on this field."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:20
msgid "Functions to retrieve the world's state"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:22
#, no-wrap
msgid "[!java|c]int [/!]getHoleBase() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:23
msgid "Returns the base in which the hole is located."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:25
#, no-wrap
msgid "[!java|c]int [/!]getHolePosition() [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:26
msgid "Returns the hole position within its base"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:28
#, no-wrap
msgid ""
"[!java|c]int [/!]getPlayerColor([!java|c]int [/!]base[!scala]:Int[/!], "
"[!java|c]int [/!]position[!scala]:Int[/!])  [!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:29
msgid "Returns the color of the player at a given location."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:32
msgid "Returns whether all players of the field are at home."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:34
#, no-wrap
msgid ""
"[!java]boolean [/!][!c]int [/!]isBaseSorted([!java|c]int [/!]base)  "
"[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:35
msgid "Returns whether all players of a given base are at home."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:39
msgid "Functions to change the world"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/sort/baseball/universe/BaseballWorld.html:41
#, no-wrap
msgid ""
"[!java|c]void [/!]move([!java|c]int [/!]base[!scala]:Int[/!], [!java|c]int "
"[/!]position[!scala]:Int[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/sort/baseball/universe/BaseballWorld.html:42
msgid ""
"Moves a given player into the hole. This throws an IllegalArgumentException "
"if the specified player is not near the hole (at most one base away)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/NaiveBaseball.html:2
msgid "Naive Rainbow Baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:4
msgid ""
"Today, the buggles decided to play a baseball game, but they are rather out "
"of luck, actually.  First, kinda forgot the rules, and ... well ... they "
"cannot find the ball and bats again.  So they decided to \"adapt a bit\" the "
"rules. As the are no ball, the buggles can only running around the field, "
"what they do happily: for a while, all attending buggle run at full speed in "
"all directions around the field."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:10
msgid ""
"But after a few collisions, they decide to invent new rules to organize a "
"bit the game: They make one team per base and two players per team. One of "
"the teams has only one player so that its base has an empty location. Then, "
"the players are dispatched randomly around the bases, and the game for them "
"is to reach their home base. The whole game stops when all players are "
"home.  There is no winning team: either all players win, or they all "
"lose. Actually, this game is very different from the original baseball. The "
"only rule that remains is that you can only run around the field, from one "
"base to the next one, without crossing middle of the field."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:18
msgid ""
"Now, they are asking you to help them deciding who and when should move so "
"that each player returns to its base. Only one buggle can move at each "
"round, from its position to the empty spot.  The maximal distance that a "
"buggle can cover in one round is of one base."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:22
msgid ""
"So, at each round, the empty spot is on one base (say <code>B</code>), and "
"you should decide which buggle enters that empty spot. There is four "
"candidates (two from base <code>B-1</code> and two from base "
"<code>B+1</code>). Actually, there is a fifth candidate since the buggle "
"that is on the same base than the empty spot can change its position, but "
"that's not really helping."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/sort/baseball/NaiveBaseball.html:27
msgid "The Naïve algorithm"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:29
msgid ""
"In this exercise, we will first explore a very simple algorithm. To decide "
"which of the four candidate buggles should enter the empty spot, we first "
"restrict ourselves and decide that buggles can only turn clockwise. Then, "
"from the two remaining candidates, we pick the one that has the largest "
"distance to cover to reach its base (turning clockwise). Click on the demo "
"button: this works rather well in practice."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:35
msgid ""
"It's hard to find a simpler algorithm for this problem: While it's not "
"sorted, search for the base containing the candidate buggles: if the hole is "
"in base <code>B</code>, it's the base <code>B+1</code>, modulo the amount of "
"bases. Then, compute the distance that each buggle of that base still has to "
"run to reach its base (0 if it's already home). Once you found the buggle "
"that should enter the empty spot, just use the <code>move</code> method on "
"it, and iterate."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/NaiveBaseball.html:41
msgid ""
"The main difficulty should be to get the few equations right: determining "
"the base next to the hole should be easy, but determining the distance that "
"a player has to cover may reveal a bit more challenging. Don't hesitate to "
"draw pictures on a paper to cover all possible cases. It should not be that "
"difficult either: there is not that many cases after all."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/SelectBaseball.html:2
msgid "Selection Baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:4
msgid ""
"The previous algorithm is very pleasant: it's rather simple and rather fast "
"to implement, but unfortunately, it is also rather wrong! In some cases, it "
"never stops, which is obviously bad. If you don't believe it, just copy "
"paste your previous code, and hit the run button. The first world of this "
"exercise is one of these unfortunate situations that drives our previous "
"algorithm crazy."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:10
msgid ""
"So we have to find another algorithm, preferably one that works in all "
"cases."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:12
msgid ""
"For that, the best solution is to start from a well known algorithm instead "
"of trying to invent a new one from scratch as we just did. When you think a "
"bit about this problem, this can is very similar to a sorting problem: Just "
"make sure that the players are sorted by their colors and you're set. And "
"while we are at it, let's generalize the game to allow more that 4 bases."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:18
msgid ""
"Let's adapt the selection sort to our situation. The big lines of the "
"algorithm is then \"for each base, select the players that should occupy "
"this base and make sure that they come to their position\". This way, we "
"will grow an sorted area where all players are already sorted (and never "
"changed) while the unsorted area shrinks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:24
msgid ""
"Selecting the player should be no problem; Do not hesitate to define some "
"methods such as <code>findPlayer()</code> or "
"<code>findPlayerBase()</code>. This will ensure that your code remains "
"understandable."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:28
msgid ""
"The most problematic aspect is to move the selected players into "
"position. For that, you have to move the hole to the position where the "
"player is, and then move both the player and the hole to the base that is "
"next to the player's goal (probably in a loop), and finally put the player "
"in the right position of its target base."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/SelectBaseball.html:33
msgid ""
"As often in programming, the devil is in the details: there is a bunch of "
"corner cases that you should detect and deal with correctly, such as the "
"cases where the player is already in the base (but not in the position that "
"you would like), or when the hole is on the right of the player (probably "
"when you sort the first base). But you will find and hunt these while "
"debugging your code."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/InsertBaseball.html:2
msgid "Insertion Baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:4
msgid ""
"The good point of adapting the selection sort to the baseball problem is "
"that we know that it works (provided that our adaptation is correct). That's "
"much better than the first naive algorithm, that was unable to converge to "
"the solution in some situations. But actually, the selection sort is not "
"perfect either as it requires a lot of swaps: we have to bring the hole to "
"the selected player and then both the player and hole in position, and "
"more. We can do better."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:10
msgid ""
"For example, each player can run quite a long way from its initial position "
"to its target solution.  Instead, it may be more interesting to split the "
"field in two parts: one on the left where all players are sorted relatively "
"to each others, and one on the right where the players are still at their "
"initial positions. Then, at each iteration, we take the player at the border "
"between the sorted and unsorted areas (that is, the left-most player of the "
"unsorted area) and move it to the left (within the sorted area) until it "
"reaches its position (that is, until the position where it's bigger that its "
"left neighbor). This would at least reduce the travel of players to the "
"sorted area as we use the first one on the border."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:19
msgid ""
"Actually, that's exactly what an insertion sort would do: maintain a sorted "
"area on the left, and put iteratively the player on the border to its "
"position within the sorted area. This is good, as we know that our algorithm "
"is not inherently flawed since we adapt a well known one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:23
msgid ""
"The easiest to adapt the insertion sort to the baseball problem is to "
"consider all positions as adjacent and forget about bases. For that, we "
"define the methods <code>getColor[!c]Insert[/!](pos)</code>, "
"<code>move[!c]Insert[/!](pos)</code> and "
"<code>getHole[!c]Insert[/!]()</code> that all use a unique integer to "
"designate a given position. These functions simply convert between the way "
"to specify a position and then call the usual functions to interact with the "
"world. If you have an <code>index</code> and want to convert it into a "
"<code>base,pos</code>, then <code>base=index/2</code> and "
"<code>pos=index%2</code>. To compute the reverse, "
"<code>index=base*2+pos</code> (this works because "
"<code>getPositionsAmount()</code> always returns 2)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:32
msgid ""
"For the algorithm itself, you should first move the hole to the position "
"1. The position 0 is considered to be the sorted area (of size 1 for now) "
"while the area above 2 is the unsorted area.  Then comes an iteration to "
"sort each element of the unsorted area. Since this iteration is a bit "
"complex, you should think of its loop invariant, that is, the condition that "
"is true before and after the loop and which explains that the loop fulfills "
"its goal. Here, the loop invariant is twofold: First, the hole is between "
"the sorted area and the unsorted area, and then, the every elements of the "
"sorted area are ... well sorted relatively to their neighbors."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:40
msgid ""
"Then, the loop body to sort an element should first descend the hole and the "
"elements within the sorted area until the element is larger than the element "
"before in the sorted area (2 moves per position to travel), and then move "
"the hole back to its position between the sorted and unsorted areas (1 move "
"per position)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/InsertBaseball.html:44
msgid ""
"Once you insert the last element within the sorted area, your whole set is "
"sorted and you're done.  I preserve the surprise of the border cases that "
"will require some little adjustments to your algorithm to make it work "
"properly :)"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/sort/baseball/BubbleBaseball.html:2
msgid "Bubble Baseball"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/BubbleBaseball.html:4
msgid ""
"Crap, we adapted the insertion sort because our selection sort required too "
"much moves to get the selected players to their position, but the insertion "
"sort requires an inordinate amount of changes to get the border elements to "
"their position within the sorted area without mixing the already sorted "
"elements. At the end of the day, our selection variant was more efficient "
"with at most <code>3*amountOfBase</code> moves to sort one element (1 to get "
"the hole alongside with the player, and 2 to get the hole+player in "
"position) while our insertion variant requires at most "
"<code>3*amountOfPlayers</code> to sort one element (2 to descend the hole "
"and player in position, 1 to get the hole back to its position). That's "
"twice as bad as there is two players per base. It may be possible to improve "
"the insertion sort by moving by more than one element when descending, but "
"it seems uneasy (at least, while not mixing the already sorted elements) and "
"it would probably only ensure that our insertion variant becomes as "
"efficient as our selection variant, not dramatically better."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/BubbleBaseball.html:16
msgid ""
"If we cannot make the sort faster, we can make it easier. If you think about "
"it, it seems rather natural to adapt the bubble sort to this problem: the "
"hole becomes the bubble that moves up and down, sorting a bit the array "
"during each traversal. The big lines are simply: \"while it's not sorted, "
"move the hole down to base 0 (moving the biggest player of each base at each "
"step) and then back to the maximal base (moving the smallest player of each "
"base)\". After a while, <code>isSorted()</code> will return true and your "
"algorithm will stop."
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/BubbleBaseball.html:22
msgid ""
"This is so easy that we introduce another variant of the problem, with more "
"than two players per base.  But actually, that shouldn't block you very "
"long, should it?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/sort/baseball/BubbleBaseball.html:25
msgid ""
"Surprisingly, the bubble sort variant requires ways less moves than the "
"other variants. This is astonishing because usually, the bubble sort "
"performs much worse than the others sorts, but it comes from the very good "
"match between its big lines and the baseball universe. It actually happens "
"rather often that a pleasantly written algorithm performs very decently. But "
"this is not an universal rule either, as demonstrated by the naive algorithm "
"of the first exercise, that was nice, simple and wrong ;)"
msgstr ""

#. type: Content of: <h1>
#: src/plm/universe/turtles/TurtleWorld.html:2
msgid "The universe of turtles"
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/turtles/TurtleWorld.html:4
msgid "This is an adaptation of LOGO for the Programmer's Learning Machine."
msgstr ""

#. type: Content of: <p>
#: src/plm/universe/turtles/TurtleWorld.html:6
msgid ""
"It is directly inspired from the work of the mathematician Seymour Papert in "
"the 60's. Inspired from the swiss psycholog Jean Piaget, he came up with a "
"learning method called LOGO to teach programming to young childs. The world "
"is full of turtles which leave a painting where they go and which respond to "
"simple orders."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/turtles/TurtleWorld.html:12
msgid "Functions to move the turtle"
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:14
#, no-wrap
msgid ""
"[!java|c]void [/!]forward([!java|c]double [/!]steps[!scala]:Double[/!])\n"
"[!java|c]void [/!]backward([!java|c]double [/!]steps[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:16
msgid "Moves forward or backward of the requested amount of steps."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:18
#, no-wrap
msgid ""
"[!java|c]void [/!]right([!java|c]double [/!]angle[!scala]:Double[/!])\n"
"[!java|c]void [/!]left([!java|c]double [/!]angle[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:20
msgid "Turns left or right of the given angle (in degrees)."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:22 src/lessons/lander/universe/DelegatingLanderWorld.html:10
#, no-wrap
msgid ""
"[!java|c]double [/!]getX()[!scala]:Double[/!]\n"
"[!java|c]double [/!]getY()[!scala]:Double[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:24
msgid ""
"Returns the current position of the turtle.  Note that the point (0,0) is on "
"the top left corner, as it is often the case in Computer Science."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:27
#, no-wrap
msgid ""
"[!java|c]void [/!]setX([!java|c]double [/!]x[!scala]:Double[/!])\n"
"[!java|c]void [/!]setY([!java|c]double [/!]y[!scala]:Double[/!])\n"
"[!java|c]void [/!]setPos([!java|c]double [/!]x[!scala]:Double[/!], "
"[!java|c]double [/!]y[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:30
msgid "Teleports the turtle to a new position (without leaving any trace)."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:32
#, no-wrap
msgid ""
"[!java|c]void [/!]moveTo([!java|c]double [/!]x[!scala]:Double[/!], "
"[!java|c]double [/!]y[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:33
msgid "Moves the turtle to a new position."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:35
#, no-wrap
msgid "[!java|c]void [/!]circle([!java|c]double [/!]radius[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:36
msgid "Draw a circle of the specified radius centered on the turtle."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:38
#, no-wrap
msgid "[!java|c]void [/!]hide()"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:39
msgid "Hides the turtle."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:41
#, no-wrap
msgid "[!java|c]void [/!]show()"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:42
msgid "Shows the turtle back."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:44
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isVisible()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:45
msgid "Returns whether the turtle is currently visible."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:47
#, no-wrap
msgid "[!java|c]void [/!]clear()"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:48
msgid "Removes any trail on the sheet."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:50
#, no-wrap
msgid "[!java|c]double [/!]getHeading()[!scala]:Double[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:51
msgid "Returns the current heading of the turtle (in degrees)."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:53
#, no-wrap
msgid "[!java|c]void [/!]setHeading([!java|c]double [/!]angle[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:54
msgid "Sets a new heading to the turtle (in degrees)."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/turtles/TurtleWorld.html:56
msgid "Functions about the pen"
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:58
#, no-wrap
msgid "[!java|c]void [/!]penUp()"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:59
msgid ""
"Moves the pen up (turtles have pens, not brushes as buggles). The turtle "
"will not leave any trace during its subsequent moves."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:62
#, no-wrap
msgid "[!java|c]void [/!]penDown()"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:63
msgid ""
"Moves the pen down. The turtle will leave a trace during its subsequent "
"moves."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:65
#, no-wrap
msgid "[!java]boolean [/!][!c]int [/!]isPenDown()[!scala]:Boolean[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:66
msgid "Returns the current pen position as a boolean."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:68
#, no-wrap
msgid "[!java|c]Color [/!]getColor()[!scala]:Color[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:69
msgid "Returns the current pen color."
msgstr ""

#. type: Content of: <pre>
#: src/plm/universe/turtles/TurtleWorld.html:71
#, no-wrap
msgid "[!java|c]void [/!]setColor([!java|c]Color [/!]color[!scala]:Color[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:72
msgid "Changes the pen color."
msgstr ""

#. type: Content of: <h2>
#: src/plm/universe/turtles/TurtleWorld.html:74
msgid "Other functions"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/plm/universe/turtles/TurtleWorld.html:77
msgid "Returns whether the current turtle is selected in the graphical interface."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/turtleart/Main.html:2 src/lessons/turtleart/short_desc.html:2
msgid "Turtle Art"
msgstr ""

#. type: Content of: <p>
#: src/lessons/turtleart/Main.html:4
msgid ""
"Since its inception in the 60's, the LOGO turtle fascinates by its ability "
"to draw nice figures on computer.  This lesson allows you to explore some of "
"the classical figures, and draw your own."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turtleart/Main.html:7
msgid ""
"The language's syntax is absolutely not presented, but if you know a bit of "
"it or if someone tells you, you can take these exercises even if you are an "
"absolute beginner in programming."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turtleart/Main.html:10
msgid ""
"Please send us your best contributions so that they get added to this "
"gallery to inspire the next ones."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turtleart/Main.html:16
msgid ""
"Other exercises should be added. A whole lot of exercises are available from "
"<a "
"href=\"http://neoparaiso.com/logo/#sect4\">http://neoparaiso.com/logo/#sect4</a> "
"or from <a "
"href=\"http://billkerr2.blogspot.fr/2009/08/40-maths-shapes-challenges.html.\">http://billkerr2.blogspot.fr/2009/08/40-maths-shapes-challenges.html</a>."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/turtleart/Main.html:19
msgid ""
"Missing: the built-ins arc() and arcTo(), that draw an arc, either w/o "
"moving or by moving to the end of the arc."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turtleart/short_desc.html:3
msgid ""
"Draw beautiful figures with the Logo turtle, and learn programming while "
"playing."
msgstr ""

#. type: Content of: <p>
#: src/lessons/turtleart/short_desc.html:6
msgid ""
"You should know the basic syntax of the programming language you will "
"choose, but no exhaustive programming practice is required to take this "
"lesson."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/universe/ConsWorld.html:2
msgid "ConsWorld"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/universe/ConsWorld.html:4
msgid ""
"This world allows you to experiment with the recursive lists, as they were "
"first introduced in Lisp. It is very similar to the BatWorld, but you are "
"supposed to write recursive functions working on [!python|java]recursive "
"strings. Since [!thelang] does not provide such a construct natively, the "
"ConsWorld defines recursive lists of type <code>RecList</code>.[/!] "
"[!scala]lists of integers (<code>List[Int]</code>).[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/universe/ConsWorld.html:12
msgid ""
"Any given such list is either the empty list (noted "
"<code>[!scala]Nil[/!][!java]null[/!][!python]None[/!]</code>), or an integer "
"followed by a list. If a list is not empty, you can retrieve its first "
"integer with <code>list.head</code> and the list containing its other "
"parameters with <code>list.tail</code>. Of course, the empty list has no "
"head nor the tail, so trying to access these elements will result in an "
"(unpleasant) error message."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/universe/ConsWorld.html:20
msgid ""
"To build your own list, you need to concatenate a head and a tail as "
"follows: [!java|python]<code>cons(head, tail)</code>[/!] "
"[!scala]<code>head::tail</code> Note that <code>::</code> is a generic "
"operator in Scala to build lists.[/!]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/universe/ConsWorld.html:26
msgid ""
"So, in summary, you can solve every exercises of this lesson with the "
"following constructs."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/universe/ConsWorld.html:30
msgid "<b>The empty list:</b>"
msgstr ""

#. type: Content of: <ul><li><pre>
#: src/lessons/recursion/cons/universe/ConsWorld.html:30
#, no-wrap
msgid "[!java]null[/!][!scala]Nil[/!][!python]None[/!]"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/universe/ConsWorld.html:31
msgid "<b>Get the first element of <code>l</code></b>"
msgstr ""

#. type: Content of: <ul><li><pre>
#: src/lessons/recursion/cons/universe/ConsWorld.html:31
#, no-wrap
msgid "l.head"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/universe/ConsWorld.html:32
msgid "<b>Get the rest of the list</b>, when the first element is removed:"
msgstr ""

#. type: Content of: <ul><li><pre>
#: src/lessons/recursion/cons/universe/ConsWorld.html:32
#, no-wrap
msgid "l.tail"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/universe/ConsWorld.html:33
msgid ""
"<b>Build a list</b> from a <code>value</code> and a <code>list</code>: "
"[!java|python]"
msgstr ""

#. type: Content of: <ul><li><pre>
#: src/lessons/recursion/cons/universe/ConsWorld.html:34
#, no-wrap
msgid "cons(value, list)"
msgstr ""

#. type: Content of: <ul><li><pre>
#: src/lessons/recursion/cons/universe/ConsWorld.html:35
#, no-wrap
msgid "value::list"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Main.html:2
msgid "Recursive Lists"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Main.html:3
msgid ""
"This lesson contains a bunch of classical exercises on recursive lists.  It "
"is certainly not the most pleasant lesson to do, but I think that it is the "
"easiest of the PLM lessons dealing with recursion."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/Main.html:10
msgid ""
"New exercises could be proposed, such as "
"http://webloria.loria.fr/~quinson/Teaching/TOP/02-td-recursivite-enonce.pdf "
"If you know some others, please report them as an issue."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/cons/Main.html:13
msgid ""
"It would be interesting to check the asymptotic complexity of the student's "
"code, but that does not sound easy to do. In Python and Java (where we "
"provide a hand-made RecList class), we could count the amount of cons per "
"exercise, but it won't be easy to relate this to the right BatTest. For "
"Scala, it sounds even more difficult as we use the classical :: operators of "
"the language. That will be difficult to override to add a counting "
"mechanism. Another solution would be to ensure that the call stack does not "
"pass a given threshold, but that sounds very difficult too. Any idea is "
"welcome."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Length.html:2
msgid "Length"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Length.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return its "
"length[!scala] (without using its <code>size</code> method, of course)[/!].  "
"[!java|python]"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Length.html:5
msgid ""
"[!python]Be careful, you are not supposed to use the Python lists, but the "
"specific type defined in this exercise. [/!] Please refer to the world's "
"documentation for more information about recursive lists."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Length.html:10 src/lessons/recursion/cons/IsMember.html:7 src/lessons/recursion/cons/Occurrence.html:7 src/lessons/recursion/cons/Last.html:6 src/lessons/recursion/cons/Min.html:6 src/lessons/recursion/cons/Increasing.html:6 src/lessons/recursion/cons/ButLast.html:6 src/lessons/recursion/cons/PlusOne.html:5 src/lessons/recursion/cons/Remove.html:9 src/lessons/recursion/cons/ButNfirst.html:6
msgid "Your solution should be linear in time."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/IsMember.html:2
msgid "IsMember"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/IsMember.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an "
"integer, return true if the given integer is one of the elements of the "
"list, or false if it cannot be found."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Occurrence.html:2
msgid "Occurrences"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Occurrence.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an "
"integer, return the amount of occurrences of the given integer in the "
"list. If the integer is not a member of the list, the function should thus "
"return 0."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Last.html:2
msgid "Last"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Last.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return its "
"last element.  You can assume that the list is not empty."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Min.html:2
msgid "Min"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Min.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return the "
"smallest of its values.  You will probably need an extra function, even if "
"you can assume that the list is not empty."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Increasing.html:2
msgid "Increasing"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Increasing.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return "
"whether its elements form an increasing sequence (i.e., if the elements are "
"sorted from the smallest to the largest one)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/ButLast.html:2
msgid "But Last"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/ButLast.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return the "
"list containing every elements but the last one.  You can assume that the "
"list is not empty."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/PlusOne.html:2
msgid "PlusOne"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/PlusOne.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return a new "
"list containing all elements of your parameter incremented by one."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Remove.html:2
msgid "Remove"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Remove.html:4
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] "
"<code>L</code>and an integer, return a new list containing all elements of "
"<code>L</code> that are not equal to the value received as parameter."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Nth.html:2
msgid "Nth"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Nth.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an integer "
"<code>N</code>, return the <code>N</code>th element of the list."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Nth.html:6 src/lessons/recursion/cons/Nfirst.html:7
msgid ""
"You can assume that the list is long enough, i.e. that there is at least "
"<code>N</code> elements.  Your solution should be linear in time."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Nfirst.html:2
msgid "Nfirst"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Nfirst.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an integer "
"<code>N</code>, return the list constituted of the first <code>N</code> "
"elements. You can assume that the list is long enough, i.e. that there is at "
"least <code>N</code> elements."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Nlast.html:2
msgid "Nlast"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Nlast.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an integer "
"<code>N</code>, return the list with only the <code>N</code> last elements."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Nlast.html:6 src/lessons/recursion/cons/ButNlast.html:6 src/lessons/recursion/cons/Concat.html:6
msgid ""
"Your solution should be linear in time, but you will probably need to define "
"several functions to achieve that complexity."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/cons/Nlast.html:8 src/lessons/recursion/cons/ButNlast.html:8 src/lessons/recursion/cons/Reverse.html:8 src/lessons/recursion/cons/Concat.html:8
msgid "I cannot do it in linear time"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/cons/Nlast.html:9 src/lessons/recursion/cons/ButNlast.html:9
msgid ""
"The trick is to compute only once (and beforehand) how many elements you "
"should keep."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/ButNfirst.html:2
msgid "But Nfirst"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/ButNfirst.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an integer "
"<code>N</code>, return the list without the <code>N</code> first elements."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/ButNlast.html:2
msgid "But Nlast"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/ButNlast.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!] and an integer "
"<code>N</code>, return the list without the <code>N</code> last elements."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Reverse.html:2
msgid "Reverse"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Reverse.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return a new "
"list with all elements in reverse order."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/Reverse.html:5
msgid ""
"This function is very important and you should not pass that challenge.  "
"Your solution should be linear in time, with the help of helper functions."
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/cons/Reverse.html:9
msgid ""
"You need an helper function in which the result is accumulated (built) at "
"each step."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/Concat.html:2
msgid "Concat"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/Concat.html:3
msgid ""
"Given two [!scala]List[Int][/!][!java|python]recursive list[/!] "
"<code>l1</code> and <code>l2</code>, return a new list with all elements of "
"<code>l1</code> followed by the elements of <code>l2</code>."
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/cons/Concat.html:9
msgid ""
"You need to modify <code>l1</code> beforehand so that the computations at "
"each step of the recursion are in constant time."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/cons/AllDifferent.html:2
msgid "All Different"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/cons/AllDifferent.html:3
msgid ""
"Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return true "
"if any two elements of the list are different (ie, if no element appears "
"more than once in the list)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/cons/AllDifferent.html:6
msgid ""
"The simplest solution is in O(n²), meaning that it runs in quadratic time.  "
"You will probably have to define one extra function for that.  Another much "
"more complex solution runs in O(n log(n))."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/lego/Main.html:2
msgid "Recursive algorithms"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/Main.html:3
msgid "This lesson allows to experiment with recursive algorithms."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/Main.html:5
msgid ""
"If you need more recursive algorithms, an exercise on recursive sorting "
"algorithms (in particular QuickSort and MergeSort) is planned in the future "
"within the sorting lesson."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/recursion/lego/Main.html:9
msgid "What can I do to improve this lesson?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/Main.html:11
msgid ""
"As usual, there are several things that could be done in this lesson to "
"improve it further:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:13
msgid ""
"The Sierpinski triangle can be drawn using a simpler L-system. See "
"http://jpvallon.free.fr/recursivite.html"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:14
msgid ""
"The arrowhead curve is also interesting: "
"http://www.mathcurve.com/fractals/sierpinski/sierpinskitriangle.shtml"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:15
msgid ""
"The dragon curve could be explained as a L-system: "
"http://ecademy.agnesscott.edu/~lriddle/ifs/heighway/heighway.htm"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:16
msgid ""
"The dragon2 curve is called the twin dragon: "
"http://ecademy.agnesscott.edu/~lriddle/ifs/heighway/twindragon.htm"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:17
msgid ""
"The space filling curves could be added (Peano, Hildebert, etc).  See: "
"http://teachout1.net/village/fill.html"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/lego/Main.html:19
msgid ""
"We could do another exercise on embeeded polygons: "
"http://www.inrialpes.fr/helix/people/genoud/ENSJAVA/tds/sujets/dessinsReccursifs/actionsrecursives.html"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/recursion/lego/short_desc.html:2
msgid "Bases of recursion"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/short_desc.html:3
msgid ""
"Discover the recursive way of thinking by drawing trees and other figures "
"with the Logo turtle."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/square/FourSquare.html:2
msgid "The small cousines of Buggles"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:4
msgid ""
"Today, we will meet the small cousines of the buggles: the turtles. In fact, "
"turtles are much olders than the buggles. They were invented in the 70's by "
"a scientific from MIT called Seymour Papert to help teaching programming, "
"and the buggles are a variation on the idea invented by Lyn Turbak from "
"Wellesley College later."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:10
msgid ""
"Turtles are thus a bit like buggles, but smaller. Just like buggles, you can "
"order them to move forward, to turn, to move backward, etc. Just like "
"buggles, they leave a line on their path when they move (but the line is "
"much smaller)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:15
msgid ""
"The main difference is that where buggles can only move of right angles, "
"turtles can move of any arbitrary angles specified by a real number (a "
"double). This gives them much more liberty in their movings. The buggles can "
"do several other tricks, like reading and writting messages, picking or "
"dropping objects, and there is sometimes walls in their worlds (but all this "
"is completely above the capacities of turtles)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:22
msgid ""
"From a practical point of view, most of the methods you knew about buggles "
"still work with turtles, with some minor adaptations. In particular, the "
"<code>forward()</code> method takes the amount of steps to do not as an "
"integer, but as a [!python]point number[/!][!java|scala|c]double[/!] (see "
"\"About this world\" for more details)."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/recursion/lego/square/FourSquare.html:29
msgid "Doubles? But what is it?"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/square/FourSquare.html:30
msgid "It's simply a point number. Example:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/square/FourSquare.html:32
#, no-wrap
msgid ""
"double x = 3.72;\n"
"x + 1.234 // Value = 4.954\n"
"x + 2. // Value = 5.72 (2. means 2.0)\n"
"x + 2 // [!java|c]Value = 5.72 (2 automatically converted to "
"2.0)[/!][!scala]Type error (+ operator don't mix Double and Int); manual "
"conversion mandatory[/!]\n"
"x * 2. // Value = 7.44 \n"
"x / 2. // Value = 1.86 \n"
"[!java|c](int) x[/!][!scala]x.asInstanceOf[Int][/!] // Value = 1 (“casting "
"to int”, converted to integer by truncating)\n"
"Math.round(x) // Value = 2 (1.86 rounded to nearest integer)\n"
"Math.floor(x) // Value = 1 (1.86 rounded toward minus infinity)\n"
"Math.floor(-5.12) // Value = -6 (rounded toward minus infinity)\n"
"Math.ceiling(x) // Value = 2 (1.86 rounded toward plus infinity)\n"
"Math.ceiling(-5.12) // Value = -5 (rounded toward plus infinity)\n"
"[!java|c](double) 17[/!][!scala]17.asInstanceOf[Double][/!] // Value = 17.0 "
"(“casted to double”, converted to double)\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:49
msgid ""
"Even if this is the first exercise on the recursivity lesson, the code you "
"have to write is not recursive. The goal is to get familiar with the turtle "
"world before getting on serious matter."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/square/FourSquare.html:53
msgid ""
"You must reproduce a simple geometrical painting constituted of four 100 "
"steps long squares (see the objective world for more details). It is "
"obviously a good idea to write a method to draw a square, and then use it in "
"your code."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/polygonfractal/PolygonFractal.html:2
msgid "Fractal of polygons"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/polygonfractal/PolygonFractal.html:4
msgid ""
"The fractal we will now draw is formed of a polygon, with little polygons on "
"each corner. The prototype of the method drawing it is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/polygonfractal/PolygonFractal.html:6
#, no-wrap
msgid ""
"[!java|c]void [/!]polygonFractal ([!java|c]int [/!]levels[!scala]:Int[/!], "
"[!java|c]int [/!]sides[!scala]:Int[/!], [!java|c]double "
"[/!]length[!scala]:Double[/!], [!java|c]double "
"[/!]shrink[!scala]:Double[/!])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/polygonfractal/PolygonFractal.html:8 src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:26 src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:45
msgid ""
"Have a look at each world's objective view to understand how to write the "
"function."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/koch/Koch.html:2
msgid "Snow flake"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/koch/Koch.html:4
msgid ""
"We will now draw snow flakes using the Koch fractal. A fractal is a "
"geometric pattern repeated at every scale."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Koch.html:7
msgid ""
"The general form is a triangle, with each side given by several recursive "
"calls. Your work is only to write the code of the <code>snowSide</code> "
"method so that it draws one side of the triangle. To make it easier, each "
"sides are represented in a specific color. Just draw the red things (without "
"changing your pen color), and the other colors will be drawn automatically."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Koch.html:13
msgid ""
"Observe the drawing in each world's objective to understand the pattern's "
"logic, and then reproduce it. At level 0, the Koch curve is just a straight "
"line.  At level 1, the curve is divided in three thirds, and the middle part "
"is replaced by the two sides of an equilateral triangle of the same length "
"as the segment being removed.  At level 2, the process is repeated, whith "
"each segments split in three parts and the middle part being replaced by the "
"two sides of an equilateral triangle."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Koch.html:20
msgid "The pseudo-code of the general case is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/koch/Koch.html:22
#, no-wrap
msgid ""
"  Draw recursively a smaller segment\n"
"  Turn 60 degrees to the left\n"
"  Draw recursively a smaller segment  \n"
"  Turn 120 degrees to the right\n"
"  Draw recursively a smaller segment\n"
"  Turn 60 degrees to the left\n"
"  Draw recursively a smaller segment\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Koch.html:30
msgid ""
"As you can see, the function forward() is not called from the recursive "
"case, only in the base case when there is no recursive call."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/recursion/lego/koch/Koch.html:34
msgid "Too much letters. Please picture it."
msgstr ""

#. type: Content of: <p><div><p>
#: src/lessons/recursion/lego/koch/Koch.html:35 src/lessons/recursion/lego/koch/SquareKoch.html:9
msgid "Here are the results of the first levels of recursion."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Koch.html:39
msgid ""
"You must write the <code>snowSide()</code> method, which is recursive but "
"<b>do not call snowFlake from snowSide</b>, or you will get very strange and "
"unexpected behaviors."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/koch/SquareKoch.html:2
msgid "Snow square"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/SquareKoch.html:4
msgid ""
"This exercise is a variation over the snow flake that we saw previously.  "
"The main difference is that we are growing little squares instead of "
"triangles on the sides of the figure."
msgstr ""

#. type: Attribute 'alt' of: <p><div>
#: src/lessons/recursion/lego/koch/SquareKoch.html:8
msgid "I don't see it, sorry. Please picture it."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/SquareKoch.html:14
msgid ""
"As previously, your <code>squareSide</code> function should only draw one "
"side of the figure, and the template will call it for all sides "
"automatically (with one color per side)."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/koch/PentaKoch.html:2
msgid "Snow pentagon"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/PentaKoch.html:4
msgid ""
"Here comes yet another variation of the Koch curve. This time, we grow "
"little pentagons (ie, polygons with five sides each). I'm sure you get it "
"now."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/PentaKoch.html:7
msgid ""
"Another difference with earlier is that the length is not divided by three "
"at each step anymore, but multiplied by 0.4. The curve looks better this way "
":)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/PentaKoch.html:10
msgid ""
"We draw only one side in this exercise so your code will be called only once "
"this time."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/koch/HexaKoch.html:2
msgid "Snow hexagon"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/HexaKoch.html:4
msgid ""
"This time, we will draw the curve that is known as the (6, 0.14)-Koch "
"curve. This means that you have to grow 6-sided polygons on the segments, "
"and that the length should be multiplied by 0.14 at each recursion level."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/HexaKoch.html:8
msgid ""
"For the record, the original Koch curve is the (3, 1/3)-Koch curve, the Snow "
"square would be (4,1/3)-Koch curve while the Snow pentagon is also called "
"the (5, 0.4)-Koch curve. If you want, you can switch to the creative mode in "
"the menu and explore freely other Koch curves. Just change the initial call "
"to hexaKoch to what you want."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/HexaKoch.html:13
msgid ""
"For further reference, please see <a "
"href=\"http://ecademy.agnesscott.edu/~lriddle/ifs/kcurve/kcurve.htm\">http://ecademy.agnesscott.edu/~lriddle/ifs/kcurve/kcurve.htm</a>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/koch/Crab.html:2
msgid "Fractal Crab"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Crab.html:4
msgid ""
"The Crab curve is not exactly a Koch curve, but that's still a fractal and "
"it's built rather similarly.  This time, we grow square triangle on the side "
"of the figure: the angle is 45 degrees, and the length is divided by "
"[!java|scala]Math.sqrt(2)[/!][!python]math.sqrt(2)[/!][!c]sqrt(2);[/!] at "
"each step."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Crab.html:8
msgid ""
"Check the figures produced by the first steps of recursion to understand the "
"pattern."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/recursion/lego/koch/Crab.html:10
msgid "Bibliographical note"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/koch/Crab.html:11
msgid ""
"This curve, also called the Lévy C curve was invented in 1938 by the French "
"mathematician Paul Lévy.  As usual, the wikipedia page is very instructive, "
"and the page provide very good additions: <a "
"href=\"http://www.mathcurve.com/fractals/c/c.shtml\">http://www.mathcurve.com/fractals/c/c.shtml</a>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/tree/Tree.html:2
msgid "Trees"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/tree/Tree.html:4
msgid ""
"We will now draw trees. For that, we will write a method using double "
"recursion following this prototype"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/tree/Tree.html:6
#, no-wrap
msgid ""
"[!java|c]void [/!]tree([!java|c]int [/!]steps[!scala]:Int[/!], "
"[!java|c]double [/!]length[!scala]:Double[/!], [!java|c]double "
"[/!]angle[!scala]:Double[/!], [!java|c]double [/!]shrink[!scala]:Double[/!])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/tree/Tree.html:8
msgid ""
"To draw a tree of four levels, you have to draw a trunk of the given length, "
"turn right of the given angle, draw a tree of level 3, turn left twice of "
"the given angle, draw another tree of level 3, and come back to your initial "
"location. Don't forget to come back to the initial location!"
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/recursion/lego/tree/Tree.html:13
msgid ""
"If a tree's trunk is of length 'len', the trunk of the next level tree will "
"be of length 'len*shrink'."
msgstr ""

#. type: Content of: <p><p><p><p><p>
#: src/lessons/recursion/lego/tree/Tree.html:16
msgid ""
"At the end, here is the pseudo-code of the general case (you should add the "
"base case yourself):"
msgstr ""

#. type: Content of: <p><p><p><p><pre>
#: src/lessons/recursion/lego/tree/Tree.html:18
#, no-wrap
msgid ""
"  Move forward of the desired length\n"
"  Draw (recursively) the right subtree\n"
"  Draw (recursively) the left subtree\n"
"  Move back to your initial position\n"
msgstr ""

#. type: Content of: <p><p><p><p><p>
#: src/lessons/recursion/lego/tree/Tree.html:23
msgid ""
"Don't forget to add the base case to your code, or your buggle will enter an "
"infinite loop.  Then, drawing the right subtree comes down to turn right and "
"then draw the subtree."
msgstr ""

#. type: Content of: <p><p><p><p><p>
#: src/lessons/recursion/lego/tree/Tree.html:26
msgid ""
"As you can see, each recursion level is represented by a distinctive "
"color. For that, you have to call the <code>current(step)</code>, passing "
"the current recursion level as a parameter. This will pick the right color "
"for you.  Don't erase your great colors when you move back to your initial "
"location."
msgstr ""

#. type: Content of: <p><p><p><p><p>
#: src/lessons/recursion/lego/tree/Tree.html:30
msgid ""
"If you get your function wrong, this can easily become hairly to debug as "
"your errors will appear at each level of the recursion, completely changing "
"the drawing.  For debugging purpose, you can use the <code>subtree()</code> "
"that will draw a correct subtree. This function is then very similar to the "
"one you are trying to write. The only difference is that "
"<code>subtree()</code> only draws in black. So, you can use it instead of a "
"recursive call to debug your code, but you have to change for a proper "
"recursive call to your own code (once it works)  to get the colors right, "
"and pass the exercise."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/sierpinski/Sierpinski.html:2
msgid "Sierpinski's Triangle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/sierpinski/Sierpinski.html:4
msgid ""
"The fractal we will now draw is formed of a big triangle inside which "
"several smaller triangles are embedded. The prototype of the function to "
"draw it is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/sierpinski/Sierpinski.html:7
#, no-wrap
msgid ""
"[!java|c]void [/!]sierpinski([!java|c]int [/!]level[!scala]:Int[/!], "
"[!java|c]double [/!]length[!scala]:Double[/!])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/sierpinski/Sierpinski.html:9
msgid ""
"Have a look at each world's objective view to understand how to write the "
"function.  To draw one side of the triangle, draw a smaller recursive "
"triangle (halve the length) and move forward by the requested length.  "
"Globally, you have to draw 3 such sides and turn by 120 between each side."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/spiral/Spiral.html:2
msgid "Spirals"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/spiral/Spiral.html:4
msgid ""
"We will now draw our first recursive function with the turtle. The goal is "
"to draw different kind of spirals with the same function, which prototype is "
"the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/spiral/Spiral.html:7
#, no-wrap
msgid ""
"[!java|c]void [/!]spiral([!java|c]int [/!]steps[!scala]:Int[/!], "
"[!java|c]int [/!]angle[!scala]:Int[/!], [!java|c]int "
"[/!]length[!scala]:Int[/!], [!java|c]int [/!]increment[!scala]:Int[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/lego/spiral/Spiral.html:9
msgid ""
"To help you understanding how to write it, here is an example of how the "
"parameters change during one specific call:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/spiral/Spiral.html:12
#, no-wrap
msgid ""
"spiral(5, 90, 0, 3);\n"
"  forward(0);\n"
"  left(90);\n"
"  spiral(4,90,3,3);\n"
"    forward(3);\n"
"    left(90);\n"
"    spiral(3,90,6,3);\n"
"      forward(6);\n"
"      left(90);\n"
"      spiral(2,90,9,3);\n"
"        forward(9);\n"
"        left(90);\n"
"        spiral(1,90,12,3);\n"
"          forward(12);\n"
"          left(90);\n"
"          spiral(0,90,12,3);\n"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/spiral/SpiralUse.html:2
msgid "Drawing spirals"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/spiral/SpiralUse.html:4
msgid ""
"This exercise is not really an exercise in that sense that you just have to "
"click on the Execute button to get the reward: All the needed code is "
"already provided. Instead, you can here explore the possibilities of the "
"code you just wrote by changing the parameters of the call to the "
"<code>spiral</code> function. You can move on to the next exercise if you "
"are short on time, and come back later to play around."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/spiral/SpiralUse.html:10
msgid ""
"Here are some of the figures that you can produce with your "
"<code>Spiral</code> function, provided that you come with the right "
"parameters. You can switch to the creative mode (from the Exercise menu)  to "
"disable the world comparison when you explore with these spirals."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/spiral/SpiralUse.html:21
msgid ""
"If you discover a cool figure, don't forget to send your parameters (menu "
"Help/feedback) so that we can add it to the list!"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:2
msgid "Dragon curve (1)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:4
msgid "The dragon curve is a classical example of recursive method."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:6
msgid "The definition of this curve is the following:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:7
msgid "the dragon curve of order 1 is a vector between to arbitrary points P and Q,"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:8
msgid ""
"the dragon curve of order n is the dragon curve of order n-1 between P and "
"R, followed by the same curve of order n-1 between Q and R, where PRQ is an "
"isosceles triangle with angle R being a right angle, and R being at the "
"right of the PQ vector. Thus, if P and Q coordinates are (x, y)  and (z, t), "
"the coordinate (u, v) of R are given by:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:14 src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:27
#, no-wrap
msgid ""
"u = (x + z)/2 + (t - y)/2\n"
"v = (y + t)/2 - (z - x)/2\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:18
msgid "The prototype of the method drawing the curve is the following:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:19 src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:23
#, no-wrap
msgid ""
"[!java|c]void [/!]dragon([!java|c]int [/!]order[!scala]:Int[/!], "
"[!java|c]double [/!]x[!scala]:Double[/!], [!java|c]double "
"[/!]y[!scala]:Double[/!], [!java|c]double [/!]z[!scala]:Double[/!], "
"[!java|c]double [/!]t[!scala]:Double[/!])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve1.html:22
msgid ""
"You should use the method <code>setPos(x,y)</code> to put your turtle at "
"coordinates (x,y) and the method <code>moveTo(z,t)</code> to draw a line "
"between the turtle position and the point(z,t)."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:2
msgid "The dragon curve (2)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:4
msgid ""
"Previous solution induce that the turtle teleports to other location, or at "
"the very least, that it moves its pen up during the drawing. Indeed, the end "
"of the drawing of the first recursive call does not match the beginning of "
"the second recursive call. That is why we had to use the method "
"<code>setPos()</code>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:10
msgid ""
"In this lesson, you will write a recursive method allowing to draw the "
"dragon curve without taking the pen up. For that, we need another recursive "
"method drawing the mirror side of the curve."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:14
msgid ""
"The method <code>dragon()</code> is then recursively defined using itself "
"and <code>dragonReverse()</code>. Likewise, the method "
"<code>dragonReverse()</code> is defined recursively using itself and "
"<code>dragon()</code>. This is thus an example of <i>mutual recursion</i>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:21
msgid ""
"The prototype of the <code>dragon()</code> method remains unchanged from "
"previous exercise:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:25
msgid ""
"The new point's coordinate (u, v) introduced by the <code>dragon()</code> "
"are:"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:31
msgid "The prototype of the method <code>dragonReverse</code> is similar:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:32
#, no-wrap
msgid ""
"[!java|c]void [/!]dragonReverse([!java|c]int [/!]order[!scala]:Int[/!], "
"[!java|c]double [/!]x[!scala]:Double[/!], [!java|c]double "
"[/!]y[!scala]:Double[/!], [!java|c]double [/!]z[!scala]:Double[/!], "
"[!java|c]double [/!]t[!scala]:Double[/!])"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:34
msgid ""
"The new point's coordinate (u, v) introduced by the "
"<code>dragonReverse()</code> are:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:36
#, no-wrap
msgid ""
"u = (x + z)/2 - (t - y)/2\n"
"v = (y + t)/2 + (z - x)/2\n"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/lego/dragoncurve/DragonCurve2.html:40
msgid ""
"To make the work of each method recursiv more visible, the line painted by "
"the <code>dragon()</code> must be red (<code>Color.red</code>) while the "
"line painted by the <code>dragonReverse()</code> must be blue "
"(<code>Color.blue</code>)."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/recursion/hanoi/Main.html:2 src/lessons/recursion/hanoi/short_desc.html:2
msgid "Hanoi towers"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/Main.html:3
msgid ""
"Here comes the super classical exercise on recursion along with some "
"variations. If you have any other nice variations, please submit them.  At "
"some point, someone should also probably contribute these variations to "
"wikipedia, as only the base problem is nicely described there."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/Main.html:8
msgid ""
"The Interleaved and Split variations come from the following article: "
"\"Exploring Recursion with Variations on the Towers of Hanoi\", Daniel "
"W. Palmer. Available at "
"http://www.ccscjournal.willmitchell.info/Vol12-96/No2a/Daniel%20W%20Palmer.pdf"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/Main.html:13
msgid ""
"The Linear Hanoi is briefly discussed in the article presenting the Linear "
"Twin Towers of Hanoi: \"The Linear Twin Towers of Hanoi Problem\", Steven "
"Minsker (ACM SIGCSE Bulletin Volume 39 Issue 4, December 2007). This article "
"can only be accessed through the paywall of the editor, sorry."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/Main.html:18
msgid ""
"The 3-colors Towers of Hanoi problem was presented on this web page: "
"http://www.cut-the-knot.org/recurrence/TricolorHanoiAuto.shtml"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/Main.html:21
msgid ""
"The Cyclic Towers of Hanoi was proposed by M.D. Atkinson in an article of "
"1981 titled \"The cyclic towers of Hanoi\" (Information Processing Letters, "
"Volume 13:3).  The article is available at "
"http://www.cs.otago.ac.nz/staffpriv/mike/Papers/Hanoi/CyclicHanoi.pdf."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/short_desc.html:3
msgid "Here comes the super classical exercise on recursion."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/short_desc.html:5
msgid ""
"This is an application exercise of recursion, that you should master to take "
"this lesson."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/HanoiBoard.html:2
msgid "Tower of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/HanoiBoard.html:4
msgid ""
"The Tower of Hanoi or Towers of Hanoi, also called the Tower of Brahma or "
"Towers of Brahma, is a mathematical game or puzzle. It consists of three "
"pegs, and a number of disks of different sizes which can slide onto any "
"peg. The puzzle starts with the disks in a neat stack in ascending order of "
"size on one peg, the smallest at the top, thus forming a pyramid."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/hanoi/HanoiBoard.html:10
msgid ""
"The objective of the puzzle is to move the entire stack to another peg, "
"obeying the following rules:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:12
msgid "Only one disk may be moved at a time."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:14
msgid ""
"Each move consists of taking the upper disk from one of the pegs and sliding "
"it onto another peg, on top of the other disks that may already be present "
"on that peg."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:18
msgid "No disk may be placed on top of a smaller disk."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/hanoi/HanoiBoard.html:23
msgid ""
"Write the core of the method: <code>[!java|c]void "
"[/!]hanoi[!c]Rec[/!]([!java|c]int [/!]height[!scala]:Int[/!], [!java|c]int "
"[/!]src[!scala]:Int[/!], [!java|c]int [/!]other[!scala]:Int[/!],[!java|c]int "
"[/!]dst[!scala]:Int[/!])</code>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/HanoiBoard.html:26
msgid ""
"This method will recursively solve the presented problem. The first "
"parameter named <code>height</code> is the height of the tower to move; The "
"second parameter <code>src</code> is the index of the initial tower, the "
"third parameter <code>other</code> is the index of the unused peg while the "
"fourth parameter <code>dst</code> is the index of the expected final tower."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/HanoiBoard.html:32
msgid ""
"A key to solving this puzzle is to recognize that it can be solved by "
"breaking the problem down into a collection of smaller problems and further "
"breaking those problems down into even smaller problems until a solution is "
"reached."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/HanoiBoard.html:36
msgid "I don't get it, please give me some extra indications"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/HanoiBoard.html:37
msgid "Here is the pseudo-code of the solution:"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:39
msgid "label the pegs A, B, C (these labels may move at different steps)"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:40
msgid "let n be the total number of discs (the height of the initial tower)"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:41
msgid "number the discs from 1 (smallest, topmost) to n (largest, bottommost)"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/HanoiBoard.html:44
msgid "To move n discs from peg A to peg C:"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:46
msgid "move n−1 discs from A to B. This leaves disc number n alone on peg A"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:47
msgid "move disc number n from A to C"
msgstr ""

#. type: Content of: <div><ul><li>
#: src/lessons/recursion/hanoi/HanoiBoard.html:48
msgid "move n−1 discs from B to C so they sit on disc number n"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:2
msgid "Interleaved Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:4
msgid ""
"In this classical variation of the Towers of Hanoi, you are given 4 pegs "
"with 2 stacks, one white and one black. You should mix the two stacks as "
"depicted in the Objective world.  As previously, you cannot move a disk on a "
"smaller disk."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:8
msgid ""
"You will probably need to reuse the <code>hanoi()</code> method that you "
"wrote in the previous exercise."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:10 src/lessons/recursion/hanoi/SplitHanoi1.html:10
msgid "Please show me an intermediate step"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:12 src/lessons/recursion/hanoi/SplitHanoi1.html:12
msgid "If your initial situation is as follows:"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/InterleavedHanoi.html:15 src/lessons/recursion/hanoi/SplitHanoi1.html:15
msgid "then you have the following situation right before the main recursive call:"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/SplitHanoi1.html:2
msgid "Split Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi1.html:4
msgid ""
"Given one interleaved stack (e.g. resulting from the previous exercise), you "
"should build two separate stacks.  In other words, your code should revert "
"the operations done to solve the previous exercise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi1.html:7
msgid ""
"You will need an extra function that can move an interleaved stack of n "
"pairs of disks, without changing the relative positions of disks of the same "
"size."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:2
msgid "Better Split Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:4
msgid ""
"Surprisingly, our solution to split the towers generates much more moves "
"than our solution to interleave them. As both problems are symmetric, this "
"should not be."
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:7 src/lessons/recursion/hanoi/SplitHanoi3.html:21
msgid "Disks amount"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:7 src/lessons/recursion/hanoi/SplitHanoi3.html:21
msgid "Interleaved"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:7
msgid "Split"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:8 src/lessons/recursion/hanoi/SplitHanoi3.html:22
msgid "5 pairs"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:8 src/lessons/recursion/hanoi/SplitHanoi3.html:22
msgid "62 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:8 src/lessons/recursion/hanoi/SplitHanoi3.html:22
msgid "88 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:9 src/lessons/recursion/hanoi/SplitHanoi3.html:23
msgid "6 pairs"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:9 src/lessons/recursion/hanoi/SplitHanoi3.html:23
msgid "126 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:9 src/lessons/recursion/hanoi/SplitHanoi3.html:23
msgid "183 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:10 src/lessons/recursion/hanoi/SplitHanoi3.html:24
msgid "7 pairs"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:10 src/lessons/recursion/hanoi/SplitHanoi3.html:24
msgid "254 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:10 src/lessons/recursion/hanoi/SplitHanoi3.html:24
msgid "374 moves"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:13
msgid "Can you make the split tower as efficient as the interleaved one?"
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:15
msgid "I need a starter hint"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:16
msgid ""
"The source of discrepancy is an inefficient problem decomposition.  "
"Satisfied that it merely worked, we looked no futher for a better solution.  "
"Keeping the disks of the interleaved tower in the correct order during every "
"move is unnecessary.  In fact, we can avoid moving the interleaved tower at "
"all.  A better problem decomposition splits the pair of disks into two "
"colored towers as they are removed from the interleaved tower."
msgstr ""

#. type: Attribute 'alt' of: <br><br><div>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:24
msgid "The starter hint was not enough"
msgstr ""

#. type: Content of: <br><br><div>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:25
msgid ""
"If someone could split the (n-1) pairs of disks beforehand, could you split "
"the remaining pair?"
msgstr ""

#. type: Attribute 'alt' of: <br><br><br><br><div>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:30
msgid "You need to be more explicit"
msgstr ""

#. type: Content of: <br><br><br><br><div><ul><li>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:32
msgid ""
"First split the first (n-1) pairs of disks from the interleaved stack into a "
"white tower and a black tower (calling recursively your main function)."
msgstr ""

#. type: Content of: <br><br><br><br><div><ul><li>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:33
msgid "Then move the large white disk on its target pole."
msgstr ""

#. type: Content of: <br><br><br><br><div><ul><li>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:34
msgid "Then move the (n-1) smaller white disks on top of the large one."
msgstr ""

#. type: Content of: <br><br><br><br><div><ul><li>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:35
msgid "Then move the large black disk on its target pole."
msgstr ""

#. type: Content of: <br><br><br><br><div><ul><li>
#: src/lessons/recursion/hanoi/SplitHanoi2.html:36
msgid "Then move the smaller black disks in position."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:2
msgid "Fast Split Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:4
msgid ""
"Again, our previous solution is working, but it is far from being optimal.  "
"When moving the towers, we use the algorithm for 3 pegs even if we have 4 "
"pegs.  Of course, movements to the last peg are restricted since it contains "
"the other stack, but we can always store the smallest disk on top of the "
"other stack before moving our stack."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:9
msgid ""
"For that, we need to devise a new function <code>hanoi_fast(height, src, "
"free, full, dst)</code> that moves the stack from <code>src</code> to "
"<code>dst</code> using <code>free</code>, but storing the smallest disk onto "
"<code>full</code> beforehand."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:13
msgid "I'm lost"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:14
msgid ""
"The <code>hanoi_fast(height, src, free, full, dst)</code> function is not "
"recursive.  It moves the first disk and then call the regular "
"<code>hanoi()</code> function."
msgstr ""

#. type: Content of: <br><p>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:18
msgid ""
"This change greatly improve the performance, as you can see below. Of "
"course, this trick could also be used for the interleaved algorithm, leading "
"as expected to the exact same performance."
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:21
msgid "Slow Split"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:21
msgid "Fast Split"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:22
msgid "46 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:23
msgid "82 moves"
msgstr ""

#. type: Content of: <br><table><tr><td>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:24
msgid "150 moves"
msgstr ""

#. type: Content of: <br><p>
#: src/lessons/recursion/hanoi/SplitHanoi3.html:27
msgid ""
"As a conclusion, most of us are satisfied with a working solution and we "
"easily overlook possibilities to improve the problem "
"decomposition. <b>You</b> should not do that ;)"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/LinearHanoi.html:2
msgid "Linear Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearHanoi.html:4
msgid ""
"This is a classical variation over the Towers of Hanoi where some moves are "
"forbidden.  Specifically, disks cannot move directly between the left-most "
"and the right-most pegs.  The middle peg must be involved in every moves."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearHanoi.html:8
msgid ""
"Beside of that extra complexity, the problem remains unchanged: you are "
"requested to move the whole stack of disks from one extremity peg to the "
"other one. You can only move one disk at a time, and a bigger disk cannot be "
"placed over a smaller one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearHanoi.html:12
msgid ""
"As with the classical version, it is much easier to produce a recursive "
"solution, and you are absolutely able to devise this solution if you think "
"hard enough about it."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/LinearHanoi.html:15
msgid "I tried, but I don't get it"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/LinearHanoi.html:16
msgid ""
"The standard recursive algorithm for classical Hanoi is of complexity "
"<i>2^n-1</i> where the standard recursive algorithm for this variation is of "
"complexity <i>3^n-1</i>."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/recursion/hanoi/LinearHanoi.html:20
msgid "That first tip was not enough"
msgstr ""

#. type: Content of: <div>
#: src/lessons/recursion/hanoi/LinearHanoi.html:21
msgid ""
"The standard recursive algorithm for classical Hanoi involves two recursive "
"calls sandwiching one movement of the largest disk, the standard recursive "
"algorithm for Linear Hanoi involves three recursive calls sandwiched around "
"two movements of the same disk."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:2
msgid "Linear Twin Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:4
msgid ""
"This is a mix between both the Split and Interleaved problems, and the "
"linear problem.  We are given two stacks of disks, on three pegs. We are "
"expected to swap the stacks' position while respecting the classical Hanoi "
"movement restrictions (one disk at a time, and no large disk over smaller "
"disks) and the linear movement restriction (no direct exchange between the "
"left-most and right-most pegs)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:10
msgid "You will use three recursive functions:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:12
msgid ""
"<b>moveDouble(k,from, to)</b>: moves an interleaved stack of k pairs of "
"disks, without changing the relative positions of disks of the same size. As "
"in the Split Hanoi problem, an interleaved stack alternates white and black "
"disks of each sizes. This function is not completely new: you wrote a "
"version with 4 pegs (but using only 3 of them) for the first version of the "
"Split Hanoi problem."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:17
msgid ""
"<b>gather(k)</b>: from the initial split situation, build on peg #2 an "
"interleaved stack of k pairs of disks. You may parametrize your function so "
"that it can be used to gather the disk on any peg passed as parameter, but "
"in practice, your function will only be used to gather on the last peg."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:21
msgid ""
"<b>scatter(k)</b>: from a situation where k pairs of disks are interleaved "
"on peg #0, split it down by moving the white disks to peg #1 and black ones "
"to peg #2."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:25
msgid ""
"In <code>gather()</code>, the recursive call comes before two calls to "
"<code>moveDouble()</code> while in <code>scatter()</code>, the calls to "
"<code>moveDouble()</code> come before the recursive call.  The main function "
"that you should write is not recursive, but simply gather almost all disks, "
"moves directly the remaining disks, and then scatters back the small disks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:31
msgid ""
"The linearity naturally induces some extra complexity as you have to "
"decompose every move between pegs 0 and 2. I am still confident in your "
"ability to overcome the challenge :)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/LinearTwinHanoi.html:35
msgid ""
"Note that the requested algorithm was proved optimal for that problem, so "
"you don't need to fiddle the performance this time."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:2
msgid "Tricolor Hanoi: stack move"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:4
msgid ""
"In this set of exercises, we will devise an algorithm for the Tricolor Hanoi "
"problem.  There will be 3 stacks on 3 pegs, each stack of a differing color, "
"and the problem is to exchange the stacks' positions under the classical "
"move rules (one disk at a time, and no bigger disk over smaller disk)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:9
msgid "As in previous exercises, our solution will use three functions:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:11
msgid ""
"<code>move3(n, src, mid, dst)</code>: moves a stack of interleaved disks, ie "
"a stack of (n*3) disks of alternating colors from peg <code>src</code> to "
"peg <code>dst</code>."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:13
msgid ""
"<code>gather()</code>: builds an interleaved stack from the regular split "
"ones."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:14
msgid ""
"<code>scatter()</code>: splits an interleaved stack into several regular "
"ones."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi1.html:17
msgid ""
"The goal of this first exercise in the series is to devise the "
"<code>move3()</code> function.  This starter task should not block you for "
"too long, actually. It is ok if your function changes the order of the "
"bottom triplet of disks, but it must preserve the order of the other "
"triplets."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/TricolorHanoi2.html:2
msgid "Tricolor Hanoi: the Gathering"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi2.html:4
msgid ""
"It is now time to write the second function required by the Tricolor Hanoi "
"problem.  <code>gather()</code> builds an interleaved stack from the regular "
"split ones. This function takes four arguments, the last one being the "
"target peg where the interleaved stack must be assembled.  As you can see in "
"the examples, the colors of must be in the same order for each triplet of "
"disks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi2.html:9
msgid ""
"That function actually uses the <code>move3()</code> that you wrote just "
"before. Simply copy/paste your code over to reuse it. If you're lost, please "
"refer to the Interleaved Hanoi exercise. Gathering 3 stacks on 3 pegs is "
"rather similar to gathering 2 stacks on 4 pegs. You can find that exercise "
"<a href=\"plm://lessons.recursion.hanoi/InterleavedHanoi\">here</a>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/TricolorHanoi3.html:2
msgid "Tricolor Hanoi: the Final"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi3.html:4
msgid ""
"We are almost ready to write the whole tricolor algorithm. We just need the "
"<code>scatter()</code> function, very inspired from the first one that we "
"wrote for the <a href=\"plm://lessons.recursion.hanoi/SplitHanoi1\">Split "
"Hanoi problem</a>. Assuming that your interleaved stack is placed on the "
"<code>mid</code> peg, spread the disks over all pegs. Make sure to use "
"<code>move3()</code> an even amount of time at each recursive level to "
"ensure that the bottom disks are in the correct order."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/TricolorHanoi3.html:10
msgid ""
"As you can see, the initial situation is not the one expected by "
"<code>scatter()</code>. You first have to apply <code>gather()</code> and "
"<code>move3()</code> (twice to get the bottom triplet in the right "
"order). These few steps plus the new <code>scatter()</code> function are "
"enough to entirely solve the Tricolor Hanoi problem."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/CyclicHanoi.html:2
msgid "Cyclic Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/CyclicHanoi.html:4
msgid ""
"This variation of the Towers of Hanoi is very similar to the regular "
"problem: you are given one stack of disks and three pegs, and you cannot "
"move a larger disk over a smaller one.  The change is that you can only move "
"disks clockwise: 0->1 or 1->2 or 2->0, but never in the other direction."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/CyclicHanoi.html:8
msgid ""
"Obviously, the movements are not symmetric anymore. Moves from A to B are "
"now very different from moves to B to A.  As a result, you need two "
"recursive functions depending on whether you are moving the stack clockwise "
"or counterclockwise."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/CyclicHanoi.html:11
msgid ""
"That being said, the problem decomposition is very similar to the classical "
"Hanoi. The twist is that each function call the other one, constituting a "
"nice example of mutual recursion."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:2
msgid "Iterative Towers of Hanoi"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:4
msgid ""
"In this last exercise of the series, we will implement an iterative "
"algorithm for the base problem of the Towers of Hanoi (one stack, 3 pegs, no "
"extra movement restriction)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:8
msgid ""
"This algorithm is actually very simple: On odd moves, the smallest disk is "
"moved in a given direction (either increasing 0-&gt;1-&gt;2-&gt;0 or "
"decreasing 2-&lt;1-&lt;0-&lt;2) while on even moves, the only possible move "
"that does not imply the smallest disk is made. You stop as soon as the stack "
"is rebuilt on another location."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:13
msgid ""
"The function that you now need to write takes two parameters: the initial "
"position of the smallest disk (i.e., the peg initially containing the stack) "
"and a boolean indicating whether the smallest disk should move in the "
"increasing order or not."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:17
msgid ""
"The simplicity of this algorithm is actually almost deceiving. One could "
"wonder on the interest of the recursive algorithms when such a simple "
"iterative algorithm exists. My personal feeling is that this solution is "
"nice to execute, but almost impossible to devise in the first place (I even "
"suspect that the authors built this iterative solution from observations of "
"the recursive execution)..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:23
msgid ""
"Predicting the effect of this function is also difficult: When the small "
"disk moves in the increasing order, the stack is reconstructed on the right "
"peg with 5 disks but on the left with 6 disks."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/IterativeHanoi.html:27
msgid ""
"An interesting question is whether such simple iterative algorithms exist "
"for the other variation of the problem. Some were given in the literature "
"(e.g. for the cyclic variation). I would happily integrate your solutions to "
"the PLM, especially if you can hint (without spoiling) the solution to guide "
"the next ones."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:2
msgid "HanoiWorld"
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:5
msgid ""
"This world implements the ultra-classical Hanoi problem. You are asked to "
"move the disk pile from the stick where they are to the target stick (given "
"as second parameter in the world's name -- number 1 for the default "
"world). There is some extra constraint: you can only move one disk at a "
"time, and you cannot move a big disk over a smaller one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:12
msgid "Only 4 functions are provided:"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:14
#, no-wrap
msgid "[!java|c]void [/!]move([!java|c]int [/!]src, [!java|c]int [/!]dst)"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:16
msgid ""
"Moves one disk from the stick <code>src</code> onto the stick "
"<code>dst</code>. If you try to do an invalid move (like laying a disk over "
"a smaller one), an IllegalArgumentException is thrown."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:20
#, no-wrap
msgid "[!java|c]int [/!]getSlotSize([!java|c]int [/!]slot)[!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:21
msgid ""
"Returns the amount of disks placed on the specified slot. This is mainly "
"used to initialize the recursion and set the amount of recursive call to "
"execute."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:24
#, no-wrap
msgid "[!java|c]int [/!]getSlotRadius([!java|c]int [/!]slot)[!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/recursion/hanoi/universe/HanoiWorld.html:25
msgid "Returns the radius of the top-most disk of the specified slot."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/maze/Main.html:2 src/lessons/maze/short_desc.html:2
msgid "Labyrinths"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/Main.html:4 src/lessons/maze/short_desc.html:4
msgid "This lesson proposes several exercises about labyrinths in the buggle world."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:2
msgid "The crazy mouse"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:4
msgid ""
"The day of your buggle starts badly. Out of luck, it got trapped into a "
"maze. Help it finding its path out of there."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:9
msgid ""
"The exit is represented by a baggle and you need to pick this baggle in "
"order to exit the maze."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:14
msgid ""
"Since the maze is so small, we can write the dumbest possible algorithm to "
"do so. It relies on randomness and proves quite inefficient."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:19
msgid ""
"While the buggle didn't find the path to the escape, it must proceed the "
"following way: pick a random integer between 0 and 2 by using the provided "
"<code>random3()</code> method and make one of the following actions: moving "
"forward if possible, turn left or turn right."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/randommouse/RandomMouseMaze.html:25
msgid ""
"You don't believe that it could work? Well, give it a try, you will see...  "
"Don't forget to pick up the baggle once you've reached it."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:2
msgid "Following the walls"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:4
msgid ""
"This time, the maze is a bit more complicated. Random won't be enough, we "
"ough to be smart!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:7
msgid ""
"The good news is that this maze is simpler that it seems at the first "
"glance: every wall are connected to each other. To get out of this kind of "
"maze, the buggle only have to follow a wall (the one on its left or the one "
"on its right, it doesn't matter).  While keeping a paw on the wall, the "
"buggle must move forward until it finds the maze exit and this biscuit it "
"loves so much."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:14
msgid ""
"This works here because there is no island of isolated walls, so our buggle "
"cannot loop around for ever without encountering its baggle."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:18
msgid ""
"The goal of this exercise is to write an algorithm allowing the buggle to "
"get out of this maze."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:21
msgid ""
"As said earlier, it does not matter whether you decide to follow the left "
"wall or the right one. Simply, the demo follows the left one, so you should "
"do the same in your solution to ease the comparison of your solution and the "
"demo."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:26
msgid ""
"Write a method <code>keepHandOnSideWall()</code> which lets the buggle move "
"one step forward while keeping the paw on the wall of the selected side. You "
"must ensure that the buggle always keep the paw on the wall, but also that "
"it won't crash into a wall. You can check the tip for more info on this, but "
"only do so if you're stuck. Try to do it without the tip first."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:33
msgid ""
"Then, write the whole algorithm to traverse the maze step by step (using "
"<code>keepHandOnSideWall()</code>) until it finds the biscuit and the "
"exit. Don't forget to pick the baggle up once you've found it."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:38
msgid "I'm lost, please give me some extra indications"
msgstr ""

#. type: Content of: <div><p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:39
msgid ""
"When your buggle has a wall on the left, there is three situations to "
"consider, depending on the surrounding walls. The following table depicts "
"each initial situation, and where you should let your buggle end after one "
"step."
msgstr ""

#. type: Content of: <div><table><tr><td>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:46
msgid "Case 1"
msgstr ""

#. type: Content of: <div><table><tr><td>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:47
msgid "Case 2"
msgstr ""

#. type: Content of: <div><table><tr><td>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:48
msgid "Case 3"
msgstr ""

#. type: Content of: <div><table><tr><td>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:50
msgid "Initial situation"
msgstr ""

#. type: Content of: <div><table><tr><td>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:55
msgid "Where is the next step"
msgstr ""

#. type: Content of: <div><p>
#: src/lessons/maze/wallfollower/WallFollowerMaze.html:61
msgid ""
"If you do a <code>right()</code> in any case at the end of your function, "
"it's possible to write it in 3 lines with a <code>while</code> loop."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/pledge/PledgeMaze.html:2
msgid "Pledge algorithm"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:4
msgid ""
"Once again, you thought that your algorithm were good enough to escape the "
"maze, and once again, you buggle is now in a maze where your previous "
"algorithm fails. Just give it a try: copy/paste your code and hit the "
"\"Run\" button and see your creation fail. The trap is shaped like an upper "
"case \"G\". The buggle enters the trap and follows the inner border. At some "
"point, it finds the north direction free, run into that direction, and falls "
"again in the trap."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:14
msgid ""
"The Pledge's algorithm (named after Jon Pledge of Exeter) can solve this "
"maze."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:17
msgid ""
"This algorithm is a modification of the previous one thought to avoid "
"obstacles. It randomly picks a heading and let the buggle move in that "
"direction. When it encounters an obstacle, a paw (for example the left one)  "
"is kept on the wall following the obstacle while counting the turns. When "
"the buggle is back to its original heading and when the sum of the turns is "
"0, the buggle leaves the obstacle and continues keeping its original "
"heading."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:25
msgid ""
"Note that the use of \"total turning\" rather than just the \"current "
"direction\" allows the algorithm to avoid G-shapped traps. If one proceeds "
"left into the trap, one gets turned around a full 360 degrees by the "
"walls. As we said before, the naive \"current direction\" algorithm gets "
"into a limit cycle as it leaves the lower rightmost wall heading left and "
"runs into the curved section on the left again."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:32
msgid ""
"The Pledge's algorithm does not leave the rightmost wall due to the total "
"turning not being zero at that point. It follows the wall all the way "
"around, finally leaving it heading left on the bottom outside"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:39
msgid ""
"<a name=\"Objective\"/>You now have to modify your solution to implement the "
"Pledge algorithm to escape this maze."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:42
msgid ""
"Change your <code>keepHandOnSideWall()</code> method to count the amount of "
"turns done by the buggle (+1 when it turns left, and -1 when it turns "
"right). This counting may require the addition of an <code>angleSum</code> "
"integer value in your program."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:47
msgid ""
"Write a boolean method <code>isDirectionFree(dir)</code> indicating if the "
"provided direction is free, ie, if you can move in that direction (Note that "
"the demo uses the NORTH direction for that).  You can retrieve the current "
"direction of the buggle using the method <code>getDirection()</code>. You "
"can change your direction (without moving) using "
"<code>setDirection(dir)</code>. Don't forget to store the previous direction "
"of your buggle (in a dedicated variable) before checking if your favorite "
"direction is free in order to restore your state afterward."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:56
msgid ""
"You may have to change the rest of your code also, but these changes should "
"remain limited."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/pledge/PledgeMaze.html:59
msgid ""
"Don't forget that if you have a method modifying a global variable (such as "
"angleSum), you should ensure that it declares this variable as "
"global. Without it, the method creates a new variable of the same name, and "
"the global never gets modified."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/maze/pledge/PledgeMaze.html:63
#, no-wrap
msgid ""
"def myMethod():\n"
"  global angleSum\n"
"  ...\n"
"  angleSum = angleSum + 1\n"
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/maze/pledge/PledgeMaze.html:70
msgid "Show an additional tip"
msgstr ""

#. type: Content of: <div>
#: src/lessons/maze/pledge/PledgeMaze.html:71
msgid ""
"You should set your direction to your favorite one (NORTH is advised). Then, "
"you should write the algorithm main loop. In other words, while your buggle "
"did not find its biscuit, you have to move forward until next obstacle in "
"the favorite direction. Then, put a paw on a wall (using "
"<code>keepHandOnSideWall()</code>) while the sum of turns is not null and "
"the favorite direction is not free. Do that until you find your baggle."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/island/IslandMaze.html:2
msgid "Lost between islands"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/island/IslandMaze.html:4
msgid ""
"You thought that your algorithm was enough to escape mazes? Well, not every "
"mazes..."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/island/IslandMaze.html:8
msgid ""
"The <i>wall follower algorithm</i> we used so far only works if the entry "
"and the exit are placed near to walls connected to the external wall. But if "
"the buggle begins in the middle of the maze, it may exist wall sections "
"disconnected from the external wall."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/maze/island/IslandMaze.html:13
msgid ""
"That is why the previous strategy would let the buggle round around for "
"ever. Indeed, the maze you should now escape from contains islands, and the "
"buggle does not start along one of the external walls. Just give it a try if "
"you want: copy your code over, push the run button and see your previous "
"solution failing miserabily."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/maze/island/IslandMaze.html:19
msgid ""
"The method of following a wall is still good and allow to escape very "
"efficiently some sections of the maze, so we do not want to remove it "
"entierely. Instead, we want to stop following the wall under some "
"conditions. Notice that the baggle lays near to the external border of the "
"maze. So, we want to reach the border and then follow that wall. We need for "
"example to search for the north wall before following it to the baggle."
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/maze/island/IslandMaze.html:27
msgid ""
"To find the north wall, you simply run to the north as long as it's "
"possible, and when facing an obstacle, you avoid it (using previous method)."
msgstr ""

#. type: Attribute 'alt' of: <p><p><div>
#: src/lessons/maze/island/IslandMaze.html:31
msgid "I'm lost now, please give me some extra indications"
msgstr ""

#. type: Content of: <p><p><div>
#: src/lessons/maze/island/IslandMaze.html:32
msgid ""
"Our new run() method will consist in two modes: our buggle will alternate "
"between the \"north runner mode\" and the \"left follower mode\". You begin "
"in \"north runner mode\", and switch to \"left follower\" when you have a "
"wall at the north (do not forget to make sure you have a wall at your left "
"before switching to \"left follower\" mode). You switch to \"north runner\" "
"as soon as your buggle is facing north and is not in front of a wall during "
"its trip around its left wall. The easiest way to write such a state machine "
"is something like"
msgstr ""

#. type: Content of: <p><p><div><pre>
#: src/lessons/maze/island/IslandMaze.html:40
#, no-wrap
msgid ""
"[!scala]var state=0;\n"
"state match  {\n"
"  case 0 => // North runner\n"
"     ...\n"
"     state = 1;\n"
"  case 1 => // Left follower\n"
"     ...\n"
"     state = 0;\n"
"  case _ => println(\"This case should not happen. Please fix me\")\n"
"}[/!][!java|c]int state=0;\n"
"switch (state) {\n"
"  case 0: // North runner\n"
"     ...\n"
"     state = 1;\n"
"     break;\n"
"  case 1: // Left follower\n"
"     ...\n"
"     state = 0;\n"
"     break;\n"
"}[/!][!python]northRunner = True\n"
"if northRunner:\n"
"     ...\n"
"     northRunner = False\n"
"else: # left follower\n"
"     ...\n"
"     northRunner = True[/!]"
msgstr ""

#. type: Content of: <p><p><div>
#: src/lessons/maze/island/IslandMaze.html:67
msgid ""
"Don't forget the default case (matching _), or scala will issue an error "
"since your matching would be incomplete.[/!]"
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/maze/island/IslandMaze.html:70
msgid "Don't forget to let the buggle pick the baggle at the end of your code."
msgstr ""

#. type: Content of: <p><p><p>
#: src/lessons/maze/island/IslandMaze.html:73
msgid ""
"You're up. That should be enough for you to figure out how to escape this "
"maze, but if not, you can always request for the tip. But you do not need "
"any more help, do you?"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:2
msgid "Basic Shortest Path algorithm"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:4
msgid ""
"To conclude with this introductory lesson to maze solving algorithms, we "
"will investigate another way to find the exit. The buggle in this lesson is "
"a special buggle: he is a jedi. He can feel the Force. This means he is able "
"to feel his environment."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:8
msgid ""
"Without even leaving his position, he can retrieve information about the "
"world he is leaving in, with the following functions:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:10
msgid "<code>getWorldWidth()</code> gives the width of its world."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:11
msgid "<code>getWorldHeight()</code> gives the height of its world."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:12
msgid ""
"<code>hasTopWall(x,y)</code> tells whether the cell (x,y) of this world has "
"a wall on top."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:13
msgid ""
"<code>hasLeftWall(x,y)</code> tells whether the cell (x,y) of this world has "
"a wall on the left."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:14
msgid ""
"<code>hasBaggle(x,y)</code> tells whether the cell (x,y) of this world has a "
"baggle."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:15
msgid ""
"<code>setIndication(x,y,i)</code> adds the integer indication <code>i</code> "
"to the cell (x,y)."
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:16
msgid ""
"<code>getIndication(x,y,i)</code> retrieves the integer indication of the "
"cell (x,y) (or 9999 if there is no indication)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:19
msgid ""
"It has to be noted that it is not possible to build a wall on the bottom "
"edge or on the right edge of a cell.  Therefore when such wall exists, it "
"means it was built on a sibling cells -- as a top (respectively left) wall "
"on the cell that is located below (respectively at the right of) the current "
"cell."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:25
msgid ""
"Your buggle should first write the distance to the exit on each cell (or at "
"least the useful ones)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:26
msgid ""
"For that, find the exit and write 0 there.  Then, write 1 on every "
"neighboring cells that is not separated from the exit with a wall.  And then "
"mark every cells from which you can reach the exit in 2 steps, and iterate "
"for all cells until all cells are marked."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:31
msgid ""
"Once the cells are marked, get your jedi buggle to follow the shortest "
"path.  Basically the buggle has only to walk on each case with the lesser "
"distance from the exit. You can use the method "
"<code>setDirection(direction)</code> to make your buggle look at the "
"specific direction such as "
"<code>[!scala|java|python]Direction.[/!]NORTH</code> or "
"<code>[!scala|java|python]Direction.[/!]EAST</code>."
msgstr ""

#. type: Attribute 'alt' of: <div>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:36
msgid "I'm lost now. Please give me some extra indications."
msgstr ""

#. type: Content of: <div>
#: src/lessons/maze/shortestpath/ShortestPathMaze.html:37
msgid "Use the Force, Luke!"
msgstr ""

#. type: Content of: <h2>
#: src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:2
msgid "Finding the walls to follow"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:4
msgid ""
"This is exactly the same maze than before, but the buggle does not start at "
"the same location. In particular, it does not have any wall to its left at "
"the beginning."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:8
msgid ""
"As a result, the method you wrote for the previous exercise probably don't "
"work for this one. If you use it here with no modification, your buggle "
"probably start looping over the four free cells around its start position "
"(if that's not the case, well, you didn't really stick to the mission on "
"previous exercise. Feel lucky and proceed to the next :)"
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:15
msgid ""
"This is because your <code>keepHandOnSideWall()</code> method has an "
"implicit <b>pre-condition</b>: it works well if and only if the buggle has a "
"wall to its left when you call it. Such pre-condition are very heavily used "
"when programming. Specifying them explicitly helps understanding the code "
"written by other, and they even allow sometimes to prove that the code works "
"correctly."
msgstr ""

#. type: Content of: <p>
#: src/lessons/maze/wallfindfollow/WallFindFollowMaze.html:25
msgid ""
"Fixing the problem should be very easy. Simply make sure that the "
"pre-condition of <code>keepHandOnSideWall()</code> is verified before "
"calling it. For that, update your code to first look for a wall on its left "
"before the big <code>while</code> loop."
msgstr ""

#. type: Content of: <h3>
#: src/lessons/lightbot/universe/LightBotWorld.html:2 src/lessons/lightbot/Main.html:2 src/lessons/lightbot/short_desc.html:2
msgid "LightBot"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lightbot/universe/LightBotWorld.html:4
msgid ""
"This universe introduces a little programming puzzle which can somehow be "
"used to introduce programmation to non-reading kids since it is programmed "
"graphically.  The goal of each board is to light up all the lights. Your "
"robot understands the following orders:"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:8
msgid "<b>Order</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:8
msgid "<b>Meaning</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:9
msgid "<b>Move forward</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:9
msgid "Cannot be done if the destination cell is of another height than source cell"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:10
msgid "<b>Jump forward</b>"
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:10
msgid ""
"Can only be done if the destination cell is one step higher than source "
"cell, or if destination is lower than source. Cannot be used for plain "
"moves."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:11
msgid "<b>Turn left</b>."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:12
msgid "<b>Turn right</b>."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:13
msgid "<b>Switch the light</b>."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:13
msgid ""
"Turn it on if it was off, and off if it was on. No effect if the cell does "
"not contain any light."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:14
msgid "<b>Call function 1</b>."
msgstr ""

#. type: Content of: <table><tr><td>
#: src/lessons/lightbot/universe/LightBotWorld.html:15
msgid "<b>Call function 2</b>."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/universe/LightBotWorld.html:18
msgid ""
"Please note that this world is not completely suited to small kids since the "
"main difficulty comes from the fact that your are highly limited in the "
"amount of instructions you can give to your robot. Advanced levels thus "
"require to write sound functions, and are often above the capacities of "
"small kids."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/universe/LightBotWorld.html:20
msgid ""
"This game is heavily inspirated from a flash game of the same name, which "
"can for example be played on kongregate.com. It was written by Danny "
"Yaroslavski (Coolio-Niato), the original idea being of Matt Chase."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lightbot/Main.html:3
msgid ""
"This lesson introduces a little programming puzzle inspired from a flash "
"game."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Main.html:5
msgid "See the <i>About this world</i> dialog for more details."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/short_desc.html:4
msgid ""
"This lesson constitutes a little brain teaser for programmers. You have to "
"instruct your robot to turn off all lights. The trick is that you program "
"your robot graphically, and that you are limited in the amount of "
"instructions."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/short_desc.html:9
msgid "No previous experience is expected to take this lesson."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board01TwoSteps.html:2
msgid "Welcome"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board01TwoSteps.html:4
msgid ""
"Welcome to the lightbot world. This is merely a programmer puzzle rather "
"than a real lesson (although some use it to teach programming).  The robot "
"is not programmed in Java, but rather graphically. You can see the existing "
"orders in the documentation using the <i>About this world</i> menu."
msgstr ""

#. type: Content of: <p><</p><p>
#: src/lessons/lightbot/Board01TwoSteps.html:7
msgid ""
"The goal of each board is simply to switch on every lights of the board "
"using your little robot."
msgstr ""

#. type: Content of: <p><</p><p>
#: src/lessons/lightbot/Board01TwoSteps.html:9
msgid ""
"This is a introduction exercise, which should be solvable by only moving "
"forward and switching the light, using respectively"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board01TwoSteps.html:11 src/lessons/lightbot/Board02Turn.html:5 src/lessons/lightbot/Board06Func.html:4
msgid "and"
msgstr ""

#. type: Content of: <p><</p><p>
#: src/lessons/lightbot/Board01TwoSteps.html:11
msgid "."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board02Turn.html:2
msgid "Turn around"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board02Turn.html:4
msgid "Now, you probably need to turn in addition (using"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board02Turn.html:5
msgid ")."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board03Jump.html:2
msgid "Jump"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board03Jump.html:4
msgid "You can also jump using"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board03Jump.html:4
msgid ""
"to pass obstacles. You can either jump one level up or any amount of levels "
"down, but you cannot jump to go on a cell of the same height."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board04Stairs.html:2
msgid "Stairs"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board04Stairs.html:4
msgid "Can you pass these stairs?"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board05Higher.html:2
msgid "Higher"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board05Higher.html:4
msgid "Let's go higher"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board06Func.html:4
msgid "You can use"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board06Func.html:4
msgid ""
"to call respectively the first and second functions. Define their code in "
"their own tab."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/lightbot/Board06Func.html:6
msgid "This is great if you get out of space in your main function"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board07Repeat.html:2
msgid "Repetitive tasks"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board07Repeat.html:4
msgid "Functions are also of great use for repetitive tasks"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board08Rec.html:2
msgid "Calling functions from functions"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board08Rec.html:4
msgid "It is perfectly okay to call a function from within a function!"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board09Castle.html:2
msgid "Castle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board09Castle.html:4
msgid "You're getting good at this..."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board10Wall.html:2
msgid "Wall"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board10Wall.html:4
msgid "Ready to climb the wall?"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board11Sea.html:2
msgid "Sea"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board11Sea.html:4
msgid "You now have to surf these waves of lamps."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lightbot/Board12Escher.html:2
msgid "Escher Castle"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lightbot/Board12Escher.html:4
msgid "This one aint easy."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/Close10.html:2
msgid "Close to 10"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/Close10.html:3
msgid ""
"Given 2 int values, return whichever value is nearest to the value 10, or "
"return 0 in the event of a tie.  [!java|scala]Note that Math.abs(n) returns "
"the absolute value of a number.[/!] [!python]Note that math.fabs(n) returns "
"the absolute value of a number.  This function can only be used if you "
"imported the math module.[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/CountTeen.html:2
msgid "Count Teen"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/CountTeen.html:3
msgid ""
"We'll say that a number is \"teen\" if it is in the range 13..19 "
"inclusive. Given 4 int values, return the amount of teen ones."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/Diff21.html:2
msgid "Diff 21"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/Diff21.html:3
msgid ""
"Given an int n, return the absolute difference between n and 21, except "
"return double the absolute difference if n is over 21."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/HasTeen.html:2
msgid "Has Teen"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/HasTeen.html:3
msgid ""
"We'll say that a number is \"teen\" if it is in the range 13..19 "
"inclusive. Given 3 int values, return true if 1 or more of them are teen."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/IcyHot.html:2
msgid "Icy Hot"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/IcyHot.html:3
msgid ""
"Given two temperatures, return true if one is less than 0 and the other is "
"greater than 100."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/In1020.html:2
msgid "In [10;20]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/In1020.html:3
msgid ""
"Given 2 int values, return true if either of them is in the range 10..20 "
"inclusive."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/In3050.html:2
msgid "In [30;50]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/In3050.html:3
msgid ""
"Given 2 int values, return true if they are both in the range 30..40 "
"inclusive, or they are both in the range 40..50 inclusive."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/LastDigit.html:2
msgid "LastDigit"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/LastDigit.html:3
msgid ""
"Given two non-negative int values, return true if they have the same last "
"digit, such as with 27 and 57. Note that the % \"mod\" operator computes "
"remainders, so 17 % 10 is 7."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/LastDigit.html:10 src/lessons/welcome/bat/bool2/ShareDigit.html:10
msgid ""
"This exercise was converted to PLM from the excellent exercising site "
"http://javabat.com/"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/LoneTeen.html:2
msgid "Lone Teen"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/LoneTeen.html:3
msgid ""
"We'll say that a number is \"teen\" if it is in the range 13..19 "
"inclusive. Given 2 int values, return true if one or the other is teen, but "
"not both."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/Main.html:2
msgid "Boolean fun"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/Main.html:4
msgid ""
"Boolean operations are one of the very basic task in programming.  As long "
"as you cannot write a not so simple boolean test under the minute, you "
"probably will have a very bad time writing a real program."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/Main.html:9
msgid ""
"That is why this lesson provides you a bunch of such exercises, so that you "
"can get trained in this."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/Makes10.html:2
msgid "Makes 10"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/Makes10.html:3
msgid ""
"Given 2 ints, a and b, return true if one of them is 10 or if their sum is "
"10."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/Max1020.html:2
msgid "Max1020"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/Max1020.html:3
msgid ""
"Given 2 positive int values, return the larger value that is in the range "
"10..20 inclusive, or return 0 if neither is in that range."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/Max1020.html:6
msgid ""
"Note that Math.max(Int,Int):Int and Math.min(Int,Int):Int return the maximum "
"and minimum of two integers"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/MonkeyTrouble.html:2
msgid "MonkeyTrouble"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/MonkeyTrouble.html:4
msgid ""
"We have two monkeys, a and b, and the parameters aSmile and bSmile indicate "
"if each is smiling.  We are in trouble if they are both smiling or if "
"neither of them is smiling.  Return true if we are in trouble."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/NearHundred.html:2
msgid "Near Hundred"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool1/NearHundred.html:3
msgid ""
"Given an int n, return true if it is within 10 of 100 or 200.  "
"[!java|scala]Note that Math.abs(n) returns the absolute value of a "
"number.[/!] [!python]Note that math.fabs(n) returns the absolute value of a "
"number.  This function can only be used if you imported the math module.[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/ParotTrouble.html:2
msgid "Parot Trouble"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/ParotTrouble.html:4
msgid ""
"We have a loud talking parrot. The \"hour\" parameter is the current hour "
"time in the range 0..23. We are in trouble if the parrot is talking and the "
"hour is before 7 or after 20. Return true if we are in trouble."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/PosNeg.html:2
msgid "Positive Negative"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/PosNeg.html:3
msgid ""
"Given 2 int values, return true if one is negative and one is "
"positive. Unless negative is true, then they both must be negative."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/SleepIn.html:2
msgid "SleepDay"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/SleepIn.html:4
msgid ""
"The parameter weekday is true if it is a weekday, and the parameter vacation "
"is true if we are on vacation. We sleep in if it is not a weekday or we're "
"on vacation. Return true if we sleep in."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool1/SumDouble.html:2
msgid "Sum Double"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool1/SumDouble.html:3
msgid ""
"Given two int values, return their sum. Unless the two values are the same, "
"then return double their sum."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/AlarmClock.html:2
msgid "AlarmClock"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/AlarmClock.html:3
msgid ""
"Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a "
"boolean indicating if we are on vacation, return a string of the form "
"\"7:00\" indicating when the alarm clock should ring. Weekdays, the alarm "
"should be \"7:00\" and on the weekend it should be \"10:00\". Unless we are "
"on vacation -- then on weekdays it should be \"10:00\" and weekends it "
"should be \"off\"."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/AnswerCell.html:2
msgid "AnswerCell"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/AnswerCell.html:3
msgid ""
"Your cell phone rings. Return true if you should answer it. Normally you "
"answer, except in the morning you only answer if it is your mom calling. In "
"all cases, if you are asleep, you do not answer."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/BlueTicket.html:2
msgid "BlueTicket"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/BlueTicket.html:3
msgid ""
"You have a blue lottery ticket, with ints a, b, and c on it. This makes "
"three pairs, which we'll call ab, bc, and ac. Consider the sum of the "
"numbers in each pair. If any pair sums to exactly 10, the result is 10.  "
"Otherwise if the ab sum is exactly 10 more than either bc or ac sums, the "
"result is 5. Otherwise the result is 0."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/CaughtSpeeding.html:2
msgid "CaughtSpeeding"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/CaughtSpeeding.html:3
msgid ""
"You are driving a little too fast, and a police officer stops you. Write "
"code to compute the result, encoded as an int value: 0=no ticket, 1=small "
"ticket, 2=big ticket. If speed is 60 or less, the result is 0. If speed is "
"between 61 and 80 inclusive, the result is 1. If speed is 81 or more, the "
"result is 2. Unless it is your birthday -- on that day, your speed can be 5 "
"higher in all cases."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/CigarParty.html:2
msgid "CigarParty"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/CigarParty.html:3
msgid ""
"When squirrels get together for a party, they like to have cigars. A "
"squirrel party is successful when the number of cigars is between 40 and 60, "
"inclusive. Unless it is the weekend, in which case there is no upper bound "
"on the number of cigars. Return true if the party was successful."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/DateFashion.html:2
msgid "DateFashion"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/DateFashion.html:3
msgid ""
"You and your date are trying to get a table at a restaurant. The parameter "
"\"you\" is the stylishness of your clothes, in the range 0..10, and \"date\" "
"is the stylishness of your date's clothes. The result getting the table is "
"encoded as an int value with 0=no, 1=maybe, 2=yes. If either of you is very "
"stylish, 8 or more, then the result is 2 (yes). With the exception that if "
"either of you has style of 2 or less, then the result is 0 (no). Otherwise "
"the result is 1 (maybe)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/FizzBuzz.html:2
msgid "Fizz Buzz"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool2/FizzBuzz.html:3
msgid ""
"According to Wikipedia, Fizz buzz is a group word game for children to teach "
"them about division.  Players take turns to count incrementally, replacing "
"any number divisible by three with the word \"Fizz\", and any number "
"divisible by five with the word \"Buzz\". Any number that is divisible by "
"both three and five is replaced with the string \"Fizz Buzz\"."
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool2/FizzBuzz.html:8
msgid ""
"Unchanged numbers are simply returned as a string.  [!java|scala]The easiest "
"for that is to use that [!thelang] idiomatic: <code>\"\"+a</code>[/!] "
"[!python]The function <code>str(a)</code> changes an integer <code>a</code> "
"into a string.[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/GreenTicket.html:2
msgid "GreenTicket"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/GreenTicket.html:3
msgid ""
"You have a green lottery ticket, with ints a, b, and c on it. If the numbers "
"are all different from each other, the result is 0. If all of the numbers "
"are the same, the result is 20. If two of the numbers are the same, the "
"result is 10."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/In1To10.html:2
msgid "In1To10"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/In1To10.html:3
msgid ""
"Given a number n, return true if n is in the range 1..10, inclusive. Unless "
"\"outsideMode\" is true, in which case return true if the number is less or "
"equal to 1, or greater or equal to 10."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/InOrderEqual.html:2
msgid "InOrderEqual"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/InOrderEqual.html:3
msgid ""
"Given three ints, a b c, return true if they are in strict increasing order, "
"such as 2 5 11, or 5 6 7, but not 6 5 7 or 5 5 7. However, with the "
"exception that if \"equalOk\" is true, equality is allowed, such as 5 5 7 or "
"5 5 5."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/InOrder.html:2
msgid "InOrder"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/InOrder.html:3
msgid ""
"Given three ints, a b c, return true if b is greater than a, and c is "
"greater than b. However, with the exception that if \"bOk\" is true, b does "
"not need to be greater than a."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/LastDigit2.html:2
msgid "LastDigit 2"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/LastDigit2.html:3
msgid ""
"Given three ints, a b c, return true if two or more of them have the same "
"rightmost digit. The ints are non-negative. Note: the % \"mod\" operator "
"computes the remainder, e.g. 17 % 10 is 7."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/LessBy10.html:2
msgid "LessBy10"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/LessBy10.html:3
msgid ""
"Given three ints, a b c, return true if one of them is 10 or more less than "
"one of the others."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/Main.html:2
msgid "Boolean (even more) fun"
msgstr ""

#. type: Content of: <p>
#: src/lessons/welcome/bat/bool2/Main.html:4
msgid ""
"A very good introduction to this type is available here: "
"http://codingbat.com/doc/java-if-boolean-logic.html"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/MaxMod5.html:2
msgid "MaxMod5"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/MaxMod5.html:3
msgid ""
"Given two int values, return whichever value is larger. However if the two "
"values have the same remainder when divided by 5, then the return the "
"smaller value. However, in all cases, if the two values are the same, return "
"0.  Note: the % \"mod\" operator computes the remainder, e.g. 7 % 5 is 2."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/NearTen.html:2
msgid "NearTen"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/NearTen.html:3
msgid ""
"Given a non-negative number \"num\", return true if num is within 2 of a "
"multiple of 10. Note: (a % b) is the remainder of dividing a by b, so (7 % "
"5) is 2."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/RedTicket.html:2
msgid "RedTicket"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/RedTicket.html:3
msgid ""
"You have a red lottery ticket showing ints a, b, and c, each of which is 0, "
"1, or 2. If they are all the value 2, the result is 10. Otherwise if they "
"are all the same, the result is 5. Otherwise so long as both b and c are "
"different from a, the result is 1. Otherwise the result is 0."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/ShareDigit.html:2
msgid "ShareDigit"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/ShareDigit.html:3
msgid ""
"Given two ints, each in the range 10..99, return true if there is a digit "
"that appears in both numbers, such as the 2 in 12 and 23. (Note: division, "
"e.g. n/10, gives the left digit while the % \"mod\" n%10 gives the right "
"digit.)"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/SortaSum.html:2
msgid "SortaSum"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/SortaSum.html:3
msgid ""
"Given 2 ints, a and b, return their sum. However, sums in the range 10..19 "
"inclusive, are forbidden, so in that case just return 20."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/SquirrelPlay.html:2
msgid "SquirrelPlay"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/SquirrelPlay.html:3
msgid ""
"The squirrels in Palo Alto spend most of the day playing. In particular, "
"they play if the temperature is between 60 and 90 (inclusive). Unless it is "
"summer, then the upper limit is 100 instead of 90. Given an int temperature "
"and a boolean isSummer, return true if the squirrels play and false "
"otherwise."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/TeaParty.html:2
msgid "TeaParty"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/TeaParty.html:3
msgid ""
"We are having a party with amounts of tea and candy. Return the int outcome "
"of the party encoded as 0=bad, 1=good, or 2=great. A party is good (1) if "
"both tea and candy are at least 5. However, if either tea or candy is at "
"least double the amount of the other one, the party is great (2).  However, "
"in all cases, if either tea or candy is less than 5, the party is always bad "
"(0)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/TeenSum.html:2
msgid "TeenSum"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/TeenSum.html:3
msgid ""
"Given 2 ints, a and b, return their sum. However, \"teen\" values in the "
"range 13..19 inclusive, are extra lucky. So if either value is a teen, just "
"return 19."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/TwoAsOne.html:2
msgid "TwoAsOne"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/TwoAsOne.html:3
msgid ""
"Given three ints, a b c, return true if it is possible to add two of the "
"ints to get the third."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/welcome/bat/bool2/WithoutDoubles.html:2
msgid "WithoutDoubles"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/welcome/bat/bool2/WithoutDoubles.html:3
msgid ""
"Return the sum of two 6-sided dice rolls, each in the range 1..6. However, "
"if noDoubles is true, if the two dice show the same value, increment one die "
"to the next value, wrapping around to 1 if its value was 6."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/Main.html:2
msgid "String fun"
msgstr ""

#. type: Content of: <p>
#: src/lessons/bat/string1/Main.html:4
msgid ""
"Strings are the simplest of the complex data types :) They provide several "
"operations, such as getting the length of the string, or a substring of it."
msgstr ""

#. type: Content of: <p>
#: src/lessons/bat/string1/Main.html:8
msgid ""
"A very good introduction to this type is available here: "
"http://codingbat.com/doc/java-string-introduction.html"
msgstr ""

#. type: Content of: <h3>
#: src/lessons/bat/string1/short_desc.html:2
msgid "Small exercises about strings"
msgstr ""

#. type: Content of: <p>
#: src/lessons/bat/string1/short_desc.html:4
msgid ""
"These are some training exercises around strings. But unfortunately, its "
"integration within PLM is still ongoing."
msgstr ""

#. type: Content of: <p>
#: src/lessons/bat/string1/short_desc.html:7
msgid "Please be patient with us."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/AltPairs.html:2
msgid "AltPairs"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/AltPairs.html:3
msgid ""
"Given a string, return a string made of the chars at indexes 0,1, 4,5, 8,9 "
"... so \"kittens\" yields \"kien\"."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/FrontTimes.html:2
msgid "FrontTimes"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/FrontTimes.html:3
msgid ""
"Given a string and a non-negative int n, we'll say that the front of the "
"string is the first 3 chars, or whatever is there if the string is less than "
"length 3. Return n copies of the front;"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/Last2.html:2
msgid "Last2"
msgstr ""

#. type: Content of: <p>
#: src/lessons/bat/string1/Last2.html:4
msgid ""
"Given a string, return the amount of times that the two last letters appear "
"as a substring of the string. So \"hixxxhi\" yields 1 (we won't count the "
"end substring) while \"aaaNaa\" yields 2 (substrings may overlap)."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringBits.html:2
msgid "StringBits"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringBits.html:3
msgid ""
"Given a string, return a new string made of every other char starting with "
"the first, so \"Hello\" yields \"Hlo\"."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringMatch.html:2
msgid "StringMatch"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringMatch.html:3
msgid ""
"Given 2 strings, a and b, return the number of the positions where they "
"contain the same length 2 substring. So \"xxcaazz\" and \"xxbaaz\" yields 3, "
"since the \"xx\", \"aa\", and \"az\" substrings appear in the same place in "
"both strings."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringSplosion.html:2
msgid "StringSplosion"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringSplosion.html:3
msgid "Given a non-empty string like \"Code\" return a string like \"CCoCodCode\"."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringTimes.html:2
msgid "StringTimes"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringTimes.html:3
msgid ""
"Given a string and a non-negative int n, return a larger string that is n "
"copies of the original string."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringX.html:2
msgid "StringX"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringX.html:3
msgid ""
"Given a string, return a version where all the \"x\" have been "
"removed. Except an \"x\" at the very start or end should not be removed."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/bat/string1/StringYak.html:2
msgid "StringYak"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/bat/string1/StringYak.html:3
msgid ""
"Suppose the string \"yak\" is unlucky. Given a string, return a version "
"where all the \"yak\" are removed, but the \"a\" can be any char. The "
"\"yak\" strings will not overlap."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/lander/Main.html:2 src/lessons/lander/short_desc.html:2 src/lessons/lander/universe/DelegatingLanderWorld.html:2
msgid "Lunar Lander"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/Main.html:4 src/lessons/lander/short_desc.html:4
msgid ""
"In this lesson you pilot a lunar landing module in increasingly complex "
"situations."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/Main.html:7
msgid ""
"At each step of the simulation, the player issues a command controlling how "
"much the angle and thrust of the lander should change"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/Main.html:10
msgid "Ideas concerning the progression of exercises:"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/lander/Main.html:12
msgid ""
"A lander in vertical position above flat ground, the player can only control "
"thrust (done)"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/lander/Main.html:14
msgid ""
"A lander in vertical position not above flat ground, the player control "
"thrust and angle (done)"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/lander/Main.html:16
msgid ""
"A lander with difficult angle and speed not above flat ground, the player "
"control thrust and angle"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/lander/Main.html:18
msgid ""
"A lander with difficult angle and speed not above flat ground, with "
"difficult ground, the player control thrust and angle"
msgstr ""

#. type: Content of: <ul><li>
#: src/lessons/lander/Main.html:20
msgid "Same with wind?"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/short_desc.html:7
msgid "This lesson assumes some basic programming and physics skills."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:4
msgid ""
"In this universe you pilot a lunar lander. At each simulation step you're "
"given the lander's position, speed, angle and thrust and must issue a "
"command adjusting its angle and thrust."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:12
msgid "Get the X and Y position of the lander."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:13
#, no-wrap
msgid ""
"[!java|c]double [/!]getSpeedX()[!scala]:Double[/!]\n"
"[!java|c]double [/!]getSpeedY()[!scala]:Double[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:15
msgid "Get the horizontal and vertical speed of the lander."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:17
#, no-wrap
msgid ""
"[!java|c]double [/!]getAngle()[!scala]:Double[/!]\n"
"[!java|c]void [/!]setDesiredAngle([!java|c]double "
"[/!]desiredAngle[!scala]:Double[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:19
msgid "Get or set the angle of the lander."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:20
msgid ""
"An angle of 0° denotes a vertical position where the \"head\" of the lander "
"points up.  This is the angle you must land with. A positive angle denotes a "
"left-leaning lander, a negative angle a right-leaning one. You cannot lean "
"more than by ±90°, and the angle can vary by at most ±5° in one step."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:25
#, no-wrap
msgid ""
"[!java|c]int [/!]getThrust()[!scala]:Int[/!]\n"
"[!java|c]void [/!]setDesiredThrust([!java|c]int [/!]thrust[!scala]:Int[/!])"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:27
msgid "Get or set the thrust of the lander."
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:27
msgid ""
"You can only increment or decrement the thrust by 1 between two simulation "
"steps, so if the current thrust is 2 and you ask for 4, you'll only get 3 in "
"the next step. If you ask for less than 0 (resp. more than 4), everything "
"will be as if you had asked for 0 (resp. 4)."
msgstr ""

#. type: Content of: <pre>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:33
#, no-wrap
msgid "[!java|c]int [/!]getFuel()[!scala]:Int[/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:34
msgid ""
"Get the remaining fuel in the lander.  At each step of the simulation the "
"lander consumes as many fuel units as the current thrust. Once you run out "
"of fuel you're in free fall so beware!"
msgstr ""

#. type: Content of: <pre>
#: src/lessons/lander/universe/DelegatingLanderWorld.html:38
#, no-wrap
msgid "[!java]List&lt;Point&gt; [/!]getGround()[! scala]:List[Point][/!]"
msgstr ""

#. type: Content of: outside any tag (error?)
#: src/lessons/lander/universe/DelegatingLanderWorld.html:39
msgid ""
"Get the vertices of the ground's profile from left to right.  "
"[!java|scala]You can retrieve the X and Y coordinates of each point with the "
"corresponding methods of your point: <code>p.x()</code> and "
"<code>p.y()</code>.[/!] [!python]Each point is an array of two integers "
"denoting respectively the X and Y coordinates of that point.[/!]"
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:2
msgid "Lander 101"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:4
msgid ""
"Congratulations! You won a (one-way) trip to Mars in a cereal box. NASA was "
"kind enough to donate the Lunar Excursion Module for this mission, so that's "
"what you'll be flying."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:8
msgid ""
"Before you take off, you must go through some basic landing simulation. You "
"shouldn't have to fly the lander if all goes as planned but, as they say, "
"\"better safe than sorry\"."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:12
msgid ""
"Your mission is to <b>land the lander with a vertical speed of at most 10 "
"m/s.</b> There are two ways you can influence the lander's course: by "
"adjusting its angle or by adjusting its thrust. In this simulation we only "
"care about adjusting the thrust, expressed in m/s²."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:17
msgid ""
"The [!python]<code>step()</code> function[/!][!scala|java|c]code[/!] that "
"you should write now will be called every 0.1 second during the "
"simulation. Make sure that your code does not last too long, with no while "
"loop! It should only set the desired thrust of the next simulation step, by "
"calling <code>[!java]void [/!]setDesiredThrust([!java]int "
"[/!]desiredThrust[!scala]:Integer[/!])</code> where "
"<code>desiredThrust</code> is some integer between 0 and 4 (that is, a "
"thrust between 0 m/s² and 4 m/s²). You can only increment or decrement the "
"thrust by 1 between two simulation steps, so if the current thrust is 2 and "
"you ask for 4, you'll only get 3 in the next step. If you ask for less than "
"0 (resp. more than 4), everything will be as if you had asked for 0 "
"(resp. 4)."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:28
msgid ""
"In order to take informed decisions, you can query the lander's state. In "
"this simulation you'll probably be interested in its vertical position: "
"<code>[!java]double [/!]getY()[!scala]:Double[/!]</code>, and its vertical "
"speed: <code>[!java]double [/!]getSpeedY()[!scala]:Double[/!]</code>. You "
"can also ask for the thrust via <code>[!java]int "
"[/!]getThrust()[!scala]:Integer[/!]</code> in case you don't remember what "
"you asked for. Remember that Mars' gravity is 3.711 m/s², it might come in "
"handy."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl1_lander_101/Lander101.html:36
msgid ""
"One last thing: the lander is pretty small so you don't have much fuel. At "
"each step of the simulation the lander consumes as many fuel units as the "
"current thrust. Once you run out of fuel you're in free fall so beware! You "
"can consult the remaining amount of available fuel units using "
"<code>[!java]int [/!]getFuel()[!scala]:Integer[/!]</code>."
msgstr ""

#. type: Content of: <h2>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:2
msgid "Locate a Landing Zone"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:4
msgid ""
"After 200 days of traveling space and eating cereals you finally reach "
"Mars. Time to land at last!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:7
msgid ""
"The lander is on autopilot and all you have to do is look around and tell it "
"where to land. The lander must <b>land on a flat zone</b> if you want to "
"remain in one piece. You indicate the lander where to land by modifying the "
"<code>getLandingZone</code> function so that it returns a "
"[!java|scala]<code>Segment</code> representing the zone of your choice."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:13
msgid ""
"A segment is composed of two <code>Point</code>s, each of them composed of "
"two <code>double</code>s. A segment is built via the "
"<code>Segment([!java]Point [/!]start[!scala]:Point[/!], [!java]Point "
"[/!]end[!scala]:Point[/!])</code> constructor.  A point is built via the "
"<code>Point([!java]double [/!]x[!scala]:Double[/!], [!java]double "
"[/!]y[!scala]:Double[/!])</code> constructor. A point's coordinates are "
"accessible via its <code>[!java]double [/!]x()[!scala]:Double[/!]</code> and "
"<code>[!java]double [/!]y()[!scala]:Double[/!]</code> methods."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:18
msgid ""
"[/!] [!python]tuple of two X coordinates representing the zone of your "
"choice.[/!]"
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:22
msgid ""
"In order to determine which zone to return, you'll need to call "
"<code>[!java]List&lt;Point&gt; "
"[/!]getGround()[!scala]List[Point][/!]</code>, which returns the vertices of "
"the ground's profile as a list of [!java|scala]<code>Point</code>[/!] "
"[!python]tuples (x,y)[/!]."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:27
msgid ""
"One more thing: your function should return a valid flat zone in any kind of "
"situation, not just for the currently visualized one. That's because it will "
"be not only tested against that world, but also against the one we had in "
"the previous exercise. As usual, you can see the other existing worlds with "
"the appropriate combobox."
msgstr ""

#. type: Content of: <p><p>
#: src/lessons/lander/lvl2_locate_landing_zone/LocateLandingZone.html:33
msgid "Have a safe landing! Don't forget to put on your space suit on your way out."
msgstr ""

#. type: Content of: <h1>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:2
msgid "Fly the Lander!"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:4
msgid ""
"After 30 days of staring at rocks and eating cereals you decide it's time to "
"go explore other parts of the planet."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:7
msgid ""
"You fly for a while and suddenly realize you're almost out of fuel.  "
"Unfortunately you're in a delicate situation and the autopilot is helpless.  "
"You will have to pilot the lander yourself. Your mission is to <b>land the "
"lander on a flat zone with a vertical speed less than 10 m/s, an horizontal "
"speed less than 5 m/s and an angle of 0°.</b>"
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:13
msgid ""
"You must define two functions: <code>[!java]void [/!]initialize()</code> and "
"<code>[!java]void [/!]step()</code>. <code>initialize()</code> is called "
"once just after you press \"Run\". You can use it to chose some flat "
"zone. As before, <code>step()</code> is called every 0.1 second and is used "
"for adjusting the lander's thrust and angle. As in the first exercise the "
"lander's thrust is adjusted via <code>[!java]void "
"[/!]setDesiredThrust([!java]int "
"[/!]desiredThrust[!scala]:Integer[/!])</code>.  But you can also control its "
"angle via <code>[!java]void [/!]setDesiredAngle([!java]double "
"[/!]desiredAngle[!scala]:Double[/!])</code>.  An angle of 0° denotes a "
"vertical position where the \"head\" of the lander points up.  This is the "
"angle you must land with. A positive angle denotes a left-leaning lander, a "
"negative angle a right-leaning one. You cannot lean more than by ±90°, and "
"the angle can vary by at most ±5° in one step."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:26
msgid ""
"As in the previous exercise, <code>[!java]List&lt;Point&gt; "
"[/!]getGround()[!scala]:List[Point][/!]</code> returns the vertices of the "
"ground's profile from left to right.  Please refer to the documentation "
"(Help/About this world) for a reference manual of your lunar lander."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:30
msgid ""
"As before, your program must safely land the lander in all the situations "
"encountered so far in addition to this new one."
msgstr ""

#. type: Content of: <p>
#: src/lessons/lander/lvl3_fly_the_lander/FlyTheLander.html:33
msgid "Good luck, try not to crash!"
msgstr ""

#. type: Content of: <h2>
#: lib/doc/MainWindow.html:1
msgid "The PLM Main Window"
msgstr ""

#. type: Content of: outside any tag (error?)
#: lib/doc/MainWindow.html:3
msgid ""
"The PLM working environment should be self-explanatory, in particular with "
"the tool tips appearing when your mouse is over the elements.  Here is a "
"little explanation of the components in case you fail to understand "
"something. The main window is made of 5 main components:"
msgstr ""

#. type: Content of: <ul><li>
#: lib/doc/MainWindow.html:10
msgid ""
"<b>The menu:</b> Placed on top of the window, it gives you access to some "
"advanced commands such as exiting the program, and some other that we will "
"detail later."
msgstr ""

#. type: Content of: <ul><li>
#: lib/doc/MainWindow.html:14
msgid ""
"<b>The tool bar:</b> Placed just below the menu, it gives you access to the "
"four main commands:"
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:19
msgid ""
"The <b>Start</b> button, which begins the compilation and execution of the "
"code you may have typed in the editor. At the end of the execution, it "
"verifies whether you reach the situation constituting the objective of the "
"exercise or not. If yes, you gain access to the next exercise using the "
"<b>Exercise</b> menu. If not, you need to rework your code."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:25
msgid ""
"The <b>Stop</b> button allows you to interupt the execution of your code, "
"what may reveal useful if you encounter an <i>infinite loop</i>."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:28
msgid ""
"The <b>Reset</b> button can be used to reset the world into its initial "
"state."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:31
msgid ""
"The <b>Demo</b> button shows you the execution of the expected "
"solution. During its execution, you may want to switch the seen world to see "
"the different expected solutions."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:34
msgid ""
"Please note that there is often several ways of achieving the awaited "
"solution, and that the one presented during the demo is not more or less "
"correct than the others. You are completely free to not follow strictly the "
"process shown by the demo, as long as your final solution matches the "
"exercise expectations."
msgstr ""

#. type: Content of: <ul><li>
#: lib/doc/MainWindow.html:41
msgid ""
"<b>Mission and editor tabs:</b> this is were you read this very text. This "
"area contains several tabs to which you can access by clicking on their name "
"on the top left. The first tab (which is always named <b>Mission</b>)  "
"contains a presentation of the current exercise. To solve an exercise, you "
"need to write your code in the other tabs. For example, you can now clic on "
"the <b>Source Code</b> tab to see the actual source. If it is empty, that's "
"because you did not write any code yet."
msgstr ""

#. type: Content of: <ul><li>
#: lib/doc/MainWindow.html:49
msgid ""
"<b>The console:</b> Placed under the tabs, this is where any messages of the "
"application will appear. This area is initially empty and white."
msgstr ""

#. type: Content of: <ul><li>
#: lib/doc/MainWindow.html:52
msgid ""
"<b>World view</b> Placed on the right of the tabs, it is constituted of five "
"elements:"
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:57
msgid ""
"A scrolling menu allows to choose the world. Indeed, the program you write "
"may be executed in several worlds to test it in differing conditions. This "
"menu allows you to choose the world you want to see. Note that this "
"scrolling menu is hidden if there is only one world in your exercise."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:62
msgid ""
"A slider placed right bellow allows to choose the animation speed of the "
"world. More precisely, it allows to choose the delay (in milliseconds) that "
"the buggles must wait after each action to allow you to see what they are "
"doing."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:67
msgid ""
"A tab <b>World</b> represents the view of the world currently selected (from "
"the scrolling menu). This view is thus constitued of a grid forming the "
"several cells of the world, as well as several <i>buggles</i> awaiting for "
"your orders."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:72
msgid ""
"An <b>Objective</b> tab displaying the world as it must be by the end of the "
"exercise."
msgstr ""

#. type: Content of: <ul><li><ul><li>
#: lib/doc/MainWindow.html:76
msgid ""
"<b>The interactive controls</b>. Placed under the world view, these buttons "
"allows you to interactively control the buggles. This way, you can try to "
"<i>manually</i> bring your buggle to the scenario objective before writting "
"the needed code in the editor."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:82
msgid "A scrolling menu allows to select the buggle you want to control."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:84
msgid "The <b>Forward</b> button let your buggle do one step forward."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:86
msgid "The <b>Backward</b> button let it do one step backward."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:88
msgid "The <b>Turn left</b> button ask your buggle to turn of 90° to its left."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:90
msgid ""
"The <b>Turn right</b> button asks the buggle to turn to the right (isn't "
"this amazing?)."
msgstr ""

#. type: Content of: <ul><li><ul><li><ul><li>
#: lib/doc/MainWindow.html:93
msgid ""
"The <b>Mark</b> button requests your buggle to leave a mark behind it when "
"it goes."
msgstr ""
