back to math cats love MicroWorlds
MicroWorlds index
Riddle Machine Overview
Go to the riddle machine project!
Get the MicroWorlds Web Player
so you can use the project

screenshot of riddle machine (inactive buttons)


To use this project, you need the free MicroWorlds Web Player, but you do not need to know anything about MicroWorlds.

This project uses a hidden question box and answer box (see below) to store lists of riddles and their answers. The riddle machine chooses and displays one question at random and gives the answer when you click "???" Click on "new_riddle" to see a new riddle. You can add your own riddles to the machine by clicking on "add_riddles" to go to the hidden page. The new riddles will only stay in the machine during one visit to the project, but you can go back and forth between the two pages, adding more riddles, as much as you want during one visit. (If you own MicroWorlds and set up this project, all of your riddles will stay as long as you like!


screenshot of the page for adding riddles

If you own MicroWorlds and would like to make your own riddle machine from scratch, here are the procedures. Create textboxes and buttons as shown. (Name your pages "riddle_machine" and "add_riddles." Name the textbox on the riddle machine "riddle" and then hide its name.)

* * * * *

Procedures for Riddle Machine:

to new_riddle
riddle, ct
make "which? 1 + random textcount "questions
riddle, print textitem :which? "questions
end

to ???
riddle, print " insert textitem :WHICH? "answers
end

to startup
riddle, ct
questions, repeat 100 [cd]
answers, repeat 100 [cd]
end

[The startup procedure runs automatically when the project loads. It simply makes sure that the riddle machine is empty and that the last (empty) line of the question and answer boxes is displayed.]

© copyright 2001 -   Wendy Petti of Math Cats.   All Rights Reserved.