http://ai2.appinventor.mit.edu/
Let's Build an APP Hi-Lo A classic Number guessing GameProgramming - switch to BLOCKS: the BLOCKS screen is where we add scripts and program objects. Variables first - Click on "variables", you get this flyout: Notice GLOBALS and LOCALS - nicely you can nominate your locals up front if you want, we will be using GLOBALS only in this project, add one (we can clone blocks easily so will do that for the rest) Then click "math", you get this flyout: Grab a "0" for now, we can edit it later. Notice also the RANDOM call is in there. The "Logic" has true/false when you need it. Define the following variables:
You will notice that if we float our mouse pointer up to the initialise "name" window, you get a helpful flyout menu: ...useful if you need to USE the variable's value, or set it to something. Now let's add EVENT HANDLERS |