Students build a practice tracker in App Builder: a text input, a Save button and a total. A variable holds the total, the button's On clicked event adds to it, and a Set text action shows it. The build adds Set text last, so students see the variable change while the screen doesn't, then fix it.
Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Try 5 min · Build (three short steps) 35 min · Check 5 min · Make it yours 15 min
App Builder runs inside the lesson page: nothing to install, no sign-in, no event limit. Each step keeps its own work in the browser, so a student who comes back carries on; Start again (press it twice) resets that step. Work is per browser and device: on a shared computer, use Save to keep a copy as a file (Open brings it back), or Share for a link to the working app.
The steps below have tick boxes that tick by themselves when the student's events match (the page reads the app as plain text). They say what to build, not how the screen looks, so layouts can differ.
The one idea: a variable remembers a number, an event changes it, and the screen only shows the new number when an event sets the text. Build 2 is the reveal: the total changes, the screen doesn't.
If students type words instead of a number, int() gives 0, so nothing is added. That's a good question for later (checking input), not this lesson.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
Every tracker remembers a number (a variable), changes it when something happens (an event), and shows it (setting the text). Today's prototype does all three.
Show the one-event table. Hands up for each option after three clicks. Don't settle it: step 10 of the build is the reveal.
Most say 45. Minutes is 45; the screen still says 0.
Finding things the first time: Properties on the right, renaming from the ⋯ menu on the left, and + Condition and + Action on the Events tab. Expect the first 10 minutes to be slow. Naming objects (SaveButton, TotalText) pays off as soon as students open the Events tab.
| What you will see | A question to ask | The fix |
|---|---|---|
| Nothing happens when Save is clicked. | Which object did you pick for the condition? | Check the condition says SaveButton is clicked, and that the button is the one named SaveButton. |
| The text shows the words Minutes or & on the screen. | Which parts are inside the quote marks? | Only the words to show go in quotes. Minutes and the & signs go outside them. |
| Typing a number adds 0. | What does the add action use? | It should be int(MinutesInput.text), with the text input's own name if it was called something else. |
One possible solution for each task. Other correct programs are fine.
{"version":1,"name":"Practice tracker","features":{"level":2},"variables":[{"name":"Minutes","value":0}],"screens":[{"id":"main","name":"Tracker","objects":[{"name":"Title","kind":"text","instanceVars":[],"instances":[{"id":"t1","x":229,"y":40,"w":342,"h":36,"text":"Practice tracker","visible":true,"vars":{}}]},{"name":"MinutesInput","kind":"input","instanceVars":[],"instances":[{"id":"t2","x":229,"y":100,"w":200,"h":42,"text":"","visible":true,"vars":{}}]},{"name":"SaveButton","kind":"button","instanceVars":[],"instances":[{"id":"t3","x":441,"y":98,"w":130,"h":46,"text":"Save","visible":true,"vars":{}}]},{"name":"TotalText","kind":"text","instanceVars":[],"instances":[{"id":"t4","x":229,"y":170,"w":342,"h":32,"text":"You've practised 0 minutes","visible":true,"vars":{}}]},{"name":"ResetButton","kind":"button","instanceVars":[],"instances":[{"id":"r1","x":441,"y":218,"w":130,"h":46,"text":"Reset","visible":true,"vars":{}}]}],"events":[{"id":"p1","else":false,"conds":[{"type":"onClicked","target":"SaveButton"}],"actions":[{"type":"addTo","value":"int(MinutesInput.text)","var":"Minutes"},{"type":"setText","target":"TotalText","value":"\"You've practised \" & Minutes & \" minutes\""}],"children":[]},{"id":"p2","else":false,"conds":[{"type":"onClicked","target":"ResetButton"}],"actions":[{"type":"setVar","var":"Minutes","value":"0"},{"type":"setText","target":"TotalText","value":"\"You've practised \" & Minutes & \" minutes\""}],"children":[]}]}],"device":"web"}
{"version":1,"name":"Practice tracker","features":{"level":2},"variables":[{"name":"Minutes","value":0},{"name":"Sessions","value":0}],"screens":[{"id":"main","name":"Tracker","objects":[{"name":"Title","kind":"text","instanceVars":[],"instances":[{"id":"t1","x":229,"y":40,"w":342,"h":36,"text":"Practice tracker","visible":true,"vars":{}}]},{"name":"MinutesInput","kind":"input","instanceVars":[],"instances":[{"id":"t2","x":229,"y":100,"w":200,"h":42,"text":"","visible":true,"vars":{}}]},{"name":"SaveButton","kind":"button","instanceVars":[],"instances":[{"id":"t3","x":441,"y":98,"w":130,"h":46,"text":"Save","visible":true,"vars":{}}]},{"name":"TotalText","kind":"text","instanceVars":[],"instances":[{"id":"t4","x":229,"y":170,"w":342,"h":32,"text":"You've practised 0 minutes","visible":true,"vars":{}}]},{"name":"ResetButton","kind":"button","instanceVars":[],"instances":[{"id":"r1","x":441,"y":218,"w":130,"h":46,"text":"Reset","visible":true,"vars":{}}]},{"name":"SessionsText","kind":"text","instanceVars":[],"instances":[{"id":"q1","x":229,"y":220,"w":342,"h":32,"text":"Sessions: 0","visible":true,"vars":{}}]}],"events":[{"id":"p1","else":false,"conds":[{"type":"onClicked","target":"SaveButton"}],"actions":[{"type":"addTo","value":"int(MinutesInput.text)","var":"Minutes"},{"type":"setText","target":"TotalText","value":"\"You've practised \" & Minutes & \" minutes\""},{"type":"addTo","value":"1","var":"Sessions"},{"type":"setText","target":"SessionsText","value":"\"Sessions: \" & Sessions"}],"children":[]},{"id":"p2","else":false,"conds":[{"type":"onClicked","target":"ResetButton"}],"actions":[{"type":"setVar","var":"Minutes","value":"0"},{"type":"setText","target":"TotalText","value":"\"You've practised \" & Minutes & \" minutes\""},{"type":"setVar","var":"Sessions","value":"0"},{"type":"setText","target":"SessionsText","value":"\"Sessions: \" & Sessions"}],"children":[]}]}],"device":"web"}
Stretch: Make the total read in hours and minutes once it's over 60 (hint: floor(Minutes / 60) and Minutes % 60).
Support: Pairs: one reads the step, one clicks, then swap for the Events half.
A variable called Score goes from 3 to 4 when a button is clicked, but the screen still says 3. What's missing?
A Set text action in the button's event, so the screen shows the new score.
Next: Chores checklist, which makes a tick that turns on and off with sub-events and Else.
Students who go on to Construct games meet the same events and variables again, in a game.