What Is AI, Really?

A free sample lesson from AI Basics

The idea

A fork in the road with a sign at each branch - a program that walks down the first branch whose sign matches can feel 'smart' without actually understanding anything, just by having good signs.

What it actually is

AI stands for Artificial Intelligence. It's a computer program that seems 'smart' - it picks answers or makes decisions all by itself. Big AI, like voice assistants, learns by studying huge piles of examples. But the AI we're building is simpler: it's just good rules, using if/elif/else, that help it react the right way. That's exactly where we're starting!

How you write it

if condition:
    ...
elif condition:
    ...
else:
    ...

A worked example

temperature = 95
if temperature > 85:
    print("It's a scorcher! Stay hydrated.")
elif temperature > 60:
    print("Nice weather for a walk.")
else:
    print("Bundle up, it's chilly!")

This tiny program reacts 'smartly' to whatever temperature you give it, picking one of three responses - it FEELS like it understands weather, but it's really just three well-chosen rules checked in order.

mood = "tired"
if mood == "tired":
    print("Maybe take a short nap!")
elif mood == "excited":
    print("Great, let's go do something fun!")
else:
    print("Tell me more about how you're feeling.")

Same idea, different topic - a 'mood advisor' that reacts sensibly to a handful of known moods, and has a reasonable fallback for anything else.

Mistakes children actually make

Mistake 1: thinking 'AI' always means a robot with a face - most AI you use daily (spam filters, a first pass at recommendations, simple voice assistant replies) is really just organized rules and pattern matching under the hood, dressed up nicely. Mistake 2: forgetting the ORDER of if/elif checks matters - 95 is ALSO greater than 60, but since Python checks top-to-bottom and stops at the first match, only the 'scorcher' message shows, never both. Mistake 3: writing separate if statements instead of an if/elif chain - with three independent ifs, a temperature of 95 would ALSO satisfy 'if temperature > 60', printing BOTH messages instead of just one, since only elif guarantees a single branch runs.

Then they try it

In the app this lesson continues with the animated explanation, spoken aloud, and then the practice: Build a simple AI weather advisor for temperature = 40: print "It's a scorcher! Stay hydrated." if over 85, "Nice weather for a walk." if over 60, otherwise "Bundle up, it's chilly!" The editor runs your child’s real code and checks the result, with their coding buddy reacting to what they wrote.

Try it free