Getting StartedGiving Commands to ObjectsPrograms 1Programs 2CalculatorVariables: Remembering StuffStrings 1Strings 2InputIfWhile: Loops and Repeating ThingsRandom Numbers and ChooseFSM: The Finite State Machine
Strings 2


backdrop.change(2);
actorbot.right();
actorbot.right();
actorbot.right();
actorbot.right();
actorbot.right();
actressbot.right();
actressbot.say("Why did the chicken cross the road?");
actorbot.say("Why?");
actressbot.say("To get to the other side.");
actingbot.say("<groan>");
curtains.close();

Now that you know how to use strings, you can do some interesting things. On the left is a Program Area with a stage for plays. actingbot is there, along with its friends actorbot and actressbot. They understand the left() and right() commands. The stage has curtains which can open() and close(). In the back, there is a backdrop object. If you give it a change() command with a number, it will change the picture shown in the back. Try typing in the program shown here. Then try making your own play!

|

Programming Basics

Programming Basics: Beginners

E-mail | About | Privacy Policy