I don’t know if this is done any more (I’m old, and don’t get out much), but there used to be professional smart-alecks at amusement parks and fairs and carnivals and suchlike places who would guess your weight, and usually come within a couple of pounds of getting it right. This was considered fun. In fact, people would pay to have these know-it-alls guess their weight. This can be a dicey proposition for them, though, especially if … well, enough of that.
Guessing a person’s age could also lead to … consequences, let’s say. But we are going to do that by means of some computer code. The guesstimate we will make is not about how the person looks (how much hair they have, what kind of clothes they wear, or how many wrinkles they’ve got), but based on what they know or what they prefer. Their knowledge or preferences will often be a tip-off about the time period in which they “grew up” and the cultural artifacts (“stuff”) that they are most comfortable with.
For example, do you think the cat on the left has ever heard of the band “Dire Straits,” who were very popular in the 1970s? How about the cat on the right?

Photo of Mark Knopfler in in 1979 by Klaus Hiltscher / CC BY-SA (https://creativecommons.org/licenses/by-sa/2.0)
Photo of Mark Knopfler in in 2012 by Land Rover MENA / CC BY (https://creativecommons.org/licenses/by/2.0)
Actually, it’s the same cat (Mark Knopfler), with the photo on the left having been taken in 1979, and the photo on the right having been taken in 2012. Which goes to show, you can’t always go by what a person looks like when guessing things about them – it’s more reliable to find out what they know about and prefer!
By the way, you’ll have to get used to me calling adult male humans “cats,” even though they are not really felines, any more than you “kids” are young goats. Let’s hope they aren’t (literal felines), anyway.
Also by the way, if you yourself have never heard of the band “Dire Straits,” the odds are that you are younger than 30 (which, if you’re a “kid” – is kind of expected to be the case); but then again, maybe you know about them anyway, because your parents or uncles or grandparents listened to them (and probably still do!).
Anyway, let’s get back to “business.” First, I will show you a few screen shots of a simple app that asks “the user” (the person who uses an app is often called “the user” in programming jargon) a few questions, and then we will talk about the code that is needed to make an app like this.





Depending on the selections made, the user will be categorized (perhaps wrongly in some cases, it’s true) as being most likely in one of the following three age categories: Whippersnapper (Young), NYNO (Neither Young Nor Old), or Geezer (Old).
In the next Step, we will look at the code behind the screens above, specifically what happens when the app starts, and what happens when the user presses the “Next” button.
Audio of this step can be found here: