|
First Summer 2006
|
Alice Chapter Six: Functions and If/Else
I have included here five worlds that one can build after and while studying Alice Chapter Six.
I am sure we will need to refer to them now and then.
The first world, referring to a problem on page 149, is here.
In this world:
- we use a built-in method to orient the ball
The second world, is here. In this world:
- we develop an own method,
- which uses an own function
The third world is here. In this world:
- we give an example of using an
if statement in a function
- (we note that in this example the use of
if is a bit redundant)
- and we use a couple more
if statements in implementing the action to be taken
- (that is, to avoid collision the aircraft above should move up, the other down, but which is which?)
The third world is here.
It is based on a world worked out in chapter 5.
There are:
- expressions with multiple conditions,
- nested if statements,
- and some special effects (video and audio)
in this world.
The last world is here.
It mostly implements a simple, random motion.
Last updated: May 21, 2006 by Adrian German for A201/A597