Learning Python: Child's Play with
André Roberge, © 2004, 2005, 2006
The following is a list of all available lessons.
Part 1. Welcome to Reeborg's world.
In this first part, we start our learning adventure in Reeborg's world.
We will learn how to write some simple computer programs.
- 1. About the browser
This first lesson briefly describes the browser included within
- 2. Reeborg explores its
In this lesson, you will start getting familiar with Reeborg's
environment and learn to use arrows on the keyboard to make
- 3. First program
This lesson what we mean by computer program and introduces two
instructions for Reeborg:
- 4. Dealing with eRRoRs
Learning about the case sensitivity of Python.
- 5. Any comments? Avez-vous
We learn how to add additional explanations meant only for humans
in programs. These are called comments. We also learn
about translating the instructions obeyed by Reeborg into other
human languages using synonyms. This is closely related to the concept of
variables which will be introduced much later.
- 6. Making a left turn
We learn about another instruction for Reeborg:
- 7. Beepers
We learn about beepers and the last two commands that Reeborg can
- 8. Darn bugs!
In this lesson we learn about bugs and how RUR-PLE can help us
find and quash them.
- 9. Building walls
We learn how to add or remove walls in Reeborg's world; this
lesson concludes with a few programming challenges.
Part 2. Reeborg knows Python.
In this second part, we will learn our first Python keywords
and how we can use them to help Reeborg accomplish various tasks
of increasing difficulty while making it easier for us to write
- 10. Definitely avoiding
In this lesson, we learn our first python keyword: def.
- 11. Avoiding repetitions,
Here, we learn how Reeborg can repeat instructions
- 12. If only Reeborg could decide on
his own ...
In this lesson, we learn our second Python keyword: if.
- 13. Listen to me ... or else
In this lesson, we learn our third Python keyword: else.
- 14. If, else, if, else,
In this lesson, we learn our fourth and fifth Python keywords:
elif and pass.
- 15. Not true!?
In this lesson, we learn our sixth Python keyword: not.
- 16. For a while
In this lesson, we learn our seventh Python keyword: while.
- 17. Amazing - part 1
We put together all we've learned so far to solve a series of
exercises, with a surprising conclusion.
- 18. Amazing - part 2
- 19. Amazing - part 3
- 20. Amazing - part 4
- 21. Amazing - part 5
- 22. It's raining!
Help Reeborg close the window in his house to prevent the rain
from coming in.
- 23. After the storm
Help Reeborg clean up his yard after a wind storm.
- 24. Teaching Reeborg to
We teach Reeborg how to add two numbers on his own. After this
lesson, we will temporarily leave Reeborg's world to learn more
about Python itself.
Part 3. Python, the interpreter.
In this third part, we will learn about the Python
interpreter. We will also learn about numbers, strings, lists,
tuples and dictionaries. This third part is very similar to a traditional
beginner's tutorial to Python ... except that we can still
have fun with Reeborg!
25. Python already knows
how to add.
In this lesson, we explore how Python adds, subtracts,
multiplies, divides, ..., numbers.
- 26. Interpreting the Python keywords In this lesson we explore how the Python interpreter deals
with a few of the Python keywords that we already know.
- 27. Variables In this lesson, we introduce the very important concept of variables
- 28. Variables and functions
In this lesson we will see how we can use functions and variables together.
- 29. What's your name?
In this lesson, we learn to use variables to represent strings.
We also learn about slicing.
- 30. Object-Oriented Programming: "dot" notation In this lesson we will learn about the "dot" notation that
is used commonly in Object-Oriented Programming languages.
We will also learn something new about Reeborg's world.
- 31. Globalization is a bad thing.
In this lesson, we will learn a new Python keyword:
- 32. Many returns
In this lesson we learn about a new Python keyword,
return, so that we can write even more
- 33. Repeat() is hiding some Python keywords
In this lesson, we learn about two new Python keywords that we have briefly
seen before: for and
- 34. Chocolate mousse cake recipe
In this lesson we learn about Python lists, see how we can find out
all the method for a given Python object, learn about a new keyword,
del. We also learn something new about
the function range().
- 35. An other kind of definition
In this lesson we learn about Python dicts, as well as the built-in
- 36. Our last sequence
In this lesson we learn about Python tuples, as well as the
difference between mutable and immutable objects.
The lesson concludes with a brief look at binary, octal and hexadecimal numbers.
Here are a few incomplete lessons that will likely be part of
- A touch of class
Two subclassing examples in Reeborg's world.
- Avoiding repetitions - the important stuff
We will learn about importing modules.
- Random escapes
Two simple programs that rely on random turns and moves to find
the exit from a maze. The first one checks for the presence of a
wall in front and moves only if there is none present. Example of
Look before you leap.
The second catches exceptions (rather than checking for the
presence of a wall). Example of Better to ask forgiveness than
Makes use of the Python keywords try and except
- A Robotic Fairy
A review exercise presented as a Fairy Tale.
Sorting exercises in Reeborg's world.
Summary of instructions