CHAPTER 1

Robot vs. Brain 🤖🧠

Meet Robo. Robo is a robot who follows logic rules 100% perfectly.

But Robo has a problem. If you say something slightly different than what he expects, he crashes! To make Robo smart, we need to leave "Rules" and start "Learning".

🤖 The Rule Follower

Standard coding uses if statements. It's like a strict parent!

word = input("Say hello: ")
if word == "hello":
    print("Hi there!")
else:
    print("I don't understand.")

This code fails if you say "Hello", "HELLO", or "Hi". It's not smart... yet!

TRAIN ROBO 🔧

Step 1: The Rigid Robot

Write code that asks for a word. If it is exactly "hello", print "Beep Boop".

word = input("Say something: ")
if word == "hello":
    print("Beep Boop")
Waiting for you to run code...

Step 2: Break the Robot

Run the code again, but type "HELLO" (all caps). The robot should stay silent (or fail to print Beep Boop).

⚠️ Try to trick it! Type anything other than lowercase "hello".

Locked 🔒

Step 3: A Tiny Upgrade

Let's make it slightly better. Add or to accept "Hi".

if word == "hello" or word == "Hi":
    print("Beep Boop")
Locked 🔒
🧠

Brain Check 📝

1. If we want Robo to understand "Sup", what do we have to do right now?

⌨️ ROBO CODE
Waiting...