0Pricing
Coding for Kids · Lesson

Giving Functions Inputs

Pass values with parameters.

Giving Functions Inputs 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.

Gifts for Functions

Hello again! 🎁 Today we give our recipes inputs.

An input is information we hand to the function so it can do its job.

Why Inputs?

Our old greet always said the same thing.

But what if we want to greet different friends by name? We need inputs! 🧑‍🤝‍🧑

A Spot for the Name

We put a word inside the (). This word is called a parameter.

Think of it as an empty box waiting to be filled. 📦

Greeting by Name

Here name is the parameter. We give it a real name when we call. Run it! 👇

def greet(name):
    print("Hello, " + name + "!")

greet("Mia")

Hello Mia!

Wow! 🎉 We passed "Mia" into the box, and the recipe said "Hello, Mia!"

The function used our input!

Different Friends

Now we can greet anyone! Just change what we put in the box. 🌈

def greet(name):
    print("Hello, " + name + "!")

greet("Sam")
greet("Lily")
greet("Max")

One Recipe, Many Hellos

See? One little recipe greeted three friends! 👫👭

The input changed each time, so the hello changed too.

More Than One Input

A recipe can take more than one input. Separate them with a comma. 🍪🍪

def add(a, b):
    print(a + b)

add(2, 3)

Math Helper

That recipe added two numbers and printed 5! 🔢

We gave it 2 and 3 as inputs.

Inputs Are Powerful

Inputs make functions flexible. 🦸

The same recipe can do different things depending on what you give it!

You Did It!

You learned about parameters (the boxes) and inputs (what fills them). 🎁

So clever! 🌟

Quick Check

Brain power time! 🧠

Input Master!

Awesome work! 🏆 Now your functions can take gifts (inputs).

Next: how a function can give something BACK to you! 🎀

Frequently asked questions

Is the “Giving Functions Inputs” lesson free?

Yes — the full text of “Giving Functions Inputs” 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 “Giving Functions Inputs”?

Pass values with parameters. 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 “Giving Functions Inputs” 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

  1. What Is a Function?
  2. Writing Your First Function
  3. Giving Functions Inputs
  4. Returning a Result
← Back to Coding for Kids