For a teacher with a class? The classroom edition has the full plan, slides and standards.

Homeschooling PDF

Family edition

App Maker: The App Remembers

Ages 11-14 ยท about 45 minutes, in one sitting

Your child opens a counting app that cannot count, and gives it what it needs: a number to remember, a button that changes it, and words that show it.

What you need

Before you start: try it once yourself

Open mytekdev.com/try/appmaker?lesson=the-app-remembers&ref=fam-appmaker-2. A short guide opens over the app. The phone shows an orange app: a big 0, the words Get to 20, a round Tap button, a Back to zero button, and the words Tap the button!

  1. It cannot count. Press Try it and tap Tap. Nothing changes. Press Keep designing.
  2. Keep. Click an empty part of the phone. On the right, under Numbers the app remembers, click + A number. A row appears: score, starts at 0, with a chip that says Starts again each time.
  3. Change. Click the Tap button on the phone. Under When tapped, first, click + Change a number. The row reads add, 1, to, score.
  4. Show. Click the big 0 on the phone. In The words on it, delete the 0. Under "Show a number, or what was typed, in these words" click { score }. The phone shows 0 again.
  5. Try it. Press Try it and tap: 1, 2, 3. Press Keep designing, click Back to zero, click + Change a number, and change add to set it to, leaving 0. Try it: the number goes back to 0.
The moment that lands is the phone showing 0 before and after. It looks the same and it is a different thing: words before, a number now.

The ideas, in plain words

A variable is a named place where a program keeps a value. The name stays the same and the value changes. In App Maker a variable is called a number the app remembers, it holds whole numbers only, and it has a starting value that it takes each time the app opens.

Children run three ideas together: the value, the thing that changes it, and the thing that shows it. This lesson pulls them apart on purpose. The value lives in the app whether or not any words show it. Take { score } out of the words, tap five times, put it back, and the screen shows 5.

A button's steps run in order from the top, and a button can hold up to four. Add 1 changes the value by one. Set it to replaces the value, whatever it was. That difference is the whole of Back to zero.

The chip beside each number says Starts again each time or Kept on the phone. A kept number is stored on the device and comes back when the app is opened again there. On the page this lesson uses it comes back after a reload.

App Maker is not a text programming language. Children build each rule as a sentence and the app writes the code, which they can read and cannot edit. It has no loops and no lists, a button holds one But if, and numbers are the only kind of data an app remembers. What it does have is the real thing in small: events, a sequence of steps, variables and a conditional, in an app that runs.

Do it together

  1. Open mytekdev.com/try/appmaker?lesson=the-app-remembers&ref=fam-appmaker-2 together. A short guide opens over the app. Press Try it and tap Tap a few times.

    You'll know it worked when: The big 0 never changes. It is only words.

  2. Press Keep designing. Click an empty part of the phone, and on the right click + A number.

    If you get stuck: Scroll the right panel down to Numbers the app remembers.

    You'll know it worked when: A number called score appears in the panel, starting at 0.

  3. Click the Tap button on the phone and click + Change a number.

    You'll know it worked when: The panel reads: add 1 to score.

  4. Click the big 0. Delete the 0 in The words on it, then click { score } under Show a number.

    You'll know it worked when: The phone still shows 0, but now it is the number, not words.

  5. Press Try it and tap. Ask: what are the three things we gave the app?

    You'll know it worked when: A number to keep the value, a step to change it, and words to show it.

Talk about it

Ask these while you work together. A child who has understood it can answer them without help:

The first question is the real test: a child who says the 0 used to be words and is now the number has the idea of a variable being shown.

For younger and older kids

Younger: For a younger child, stop when the app counts and let them tap to 20.

Older: For a teenager, make Back to zero work, then switch the number to Kept on the phone and reload the page.

Keep going

Bring it into other subjects

For your records

Ready to copy into an hour log, a portfolio or a transcript.

LessonApp Maker: The App Remembers
SubjectsComputer science, Technology
Time45 minutes
What we didGave a small app a variable, a button step that adds to it and words that display it, then predicted its value after a sequence of taps.
Skills practicedVariables; Changing and displaying a value; Predicting a program's behavior

App Maker: The App Remembers

Activity sheet (optional)

Name: ______________________________ Date: ______________

Open the app: scan the QR code, or go to mytekdev.com/try/appmaker?lesson=the-app-remembers

Essential question: How does an app remember something, and how does what it remembers get onto the screen?

Warm-up: A game shows your score in the corner. Where is the score when it is not on the screen? ____________________

  1. Vocabulary. Variable, value, step, starting value, display: write each in your own words.
  2. Predict, then check. The number starts at 0. Write what it shows after each of these, before you tap: Tap. Tap. Tap. Back to zero. Tap. Tap. Then check each one in Try it.
  3. Three jobs. Keeps the value: ____________ Changes it: ____________ Shows it: ____________

1. The phone showed 0 before you gave the app a number and 0 after. What was different?

2. What is the difference between add 1 and set it to 0? When would you use each?

Quick check

Name: ______________________________

1. A variable is (A) a button that changes color (B) a named place where a program keeps a value that can change (C) the words on a screen

2. A number starts at 0. A button adds 1 to it. After the button is tapped 4 times and then a button that sets it to 0 is tapped once, the number is (A) 4 (B) 5 (C) 0

3. An app is counting, but the screen never shows the count. What is missing?

Answers

QuestionAnswerWhy
1BThe name stays the same and the value changes.
2CSet it to replaces the value, whatever it was.
3Words that show the numberAccept: { score } in some words, something to display it. The value exists whether or not it is shown.

If your state or umbrella school asks, this lesson covers CSTA 2017 1B-AP-09, CSTA 2017 2-AP-11.