Asking for the Name
Use input to talk with the user.
Asking for the Name is a free Coding for Kids lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Talking to the Computer 💻
Hello, friend! 👋 So far WE told the computer things. Today the computer asks US a question and waits for our answer! 🤩
The input() Magic 🪄
The word input() makes the computer ask and wait for you to type.
Whatever you type becomes a string!
name = input("What is your name? ")
print("Hi!")Catching the Answer 🎣
The answer you type gets saved in a box. Here we save it in name, then say hello back!
name = input("What is your name? ")
print("Hello, " + name + "!")The Question Prompt ❓
The text inside input("...") is the question shown to the user. Make it friendly! 😊
food = input("What is your favorite food? ")
print("Yum, " + food + "!")Ask Anything! 🎈
You can ask about anything: a color, a pet, a superhero. The computer will remember the answer!
color = input("What is your favorite color? ")
print("Cool, " + color + " is awesome!")Two Questions in a Row ✌️
You can ask more than one thing! Each input() waits for its own answer.
name = input("Your name? ")
pet = input("Your pet? ")
print(name + " has a " + pet)Input Is Always a String 🔤
Important: whatever you type with input() is always a string (text), even numbers!
age = input("How old are you? ")
print("You are " + age + " years old!")Make a Friendly Robot 🤖
Let us build a little robot that greets you by name. Beep boop! 🤖
name = input("Tell me your name: ")
print("BEEP BOOP! Nice to meet you, " + name)A Fun Compliment 💖
Ask for a name, then give a sweet compliment back!
name = input("Name please: ")
print(name + ", you are super smart! 🌟")Build a Mini Quiz 🎯
Ask a fun question and respond to the answer.
hero = input("Who is your favorite hero? ")
print("Wow, " + hero + " is so cool!")Your Turn to Ask! 🗣️
You are amazing! Try writing your own question with input() and a fun reply.
thing = input("What do you want to be? ")
print("A " + thing + "? That is a great dream!")Quick Check 🧠
Thinking caps on! 🎓 What does input() do?
Recap Time! 🌟
Fantastic! 🎉 Today you learned:
input()asks and waits for an answer- The answer is saved in a box (variable)
- Input is always a string
- You can join it with
+to reply!
Now you can chat with the computer! 💬
Frequently asked questions
Is the “Asking for the Name” lesson free?
Yes — the full text of “Asking for the Name” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Asking for the Name”?
Use input to talk with the user. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Coding for Kids?
No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Asking for the Name” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Coding for Kids lesson?
Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What Is a String?
- Joining Words
- Asking for the Name
- Big and Small Letters