FINAL BOSS

The Smart Chatbot 🤖

It's time to build a real AI. This chatbot will have a Memory (Dictionary).
If it doesn't know an answer, it will ask YOU to teach it. Then it remembers forever!

🧠 The Brain (Dictionary)

We store knowledge as Question : Answer pairs.

brain = {
  "hello": "Hi there!",
  "name": "I am Robo."
}

BUILD THE MIND 🧠

Step 1: Create Memory

Define a dictionary called `brain` with at least one greeting.

brain = {
    "hello": "Hi there!"
}
Waiting for you to run code...

Step 2: Ask a Question

Define `user_input` as something the robot DOESN'T know yet (e.g., "weather").

user_input = "weather"
Locked 🔒

Step 3: Teach It

Check if key exists. If not, add it! This is Learning.

if user_input in brain:
    print(brain[user_input])
else:
    print("I don't know that yet!")
    brain[user_input] = "It is sunny."
    print("Thanks! I learned it.")
Locked 🔒
🎓

Final Check 📝

1. If you run the code again with "weather", what happens?

⌨️ AI LAB
Waiting...