0Pricing
Coding for Kids · Lesson

What Is a Code?

Hide messages.

What Is a Code? is a free Coding for Kids lesson on CoddyKit — lesson 1 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.

Secret Codes! 🕵️

Spies use secret codes to hide messages! 🤫 Only people who know the secret can read them.

Let's learn how to make our own!

What Is a Code? 🔐

A code changes a message so others can't understand it. HELLO might become IFMMP!

print('Secret messages are fun! 🤫')

Text in Python 📝

Words inside quotes are called strings. Let's print one.

message = 'MEET AT NOON'
print(message)

A Simple Swap 🔄

One easy code: swap a word for a secret word!

secret = 'banana'
print('The password is', secret)

Backwards Code! ⏪

Reading a word backwards is a code too! Python can flip text with [::-1].

word = 'HELLO'
print(word[::-1])

Flip It Back 🔁

To decode a backwards word, just flip it again!

code = 'OLLEH'
print(code[::-1])

Letters Have Numbers 🔢

Every letter has a secret number! ord('A') shows it. A is 65!

print(ord('A'))

Number Back to Letter 🔡

chr(65) turns the number back into a letter!

print(chr(65))

Try Other Letters 🅱️

B is 66, C is 67... see the pattern?

print(ord('B'))
print(ord('C'))

Shift a Letter ➡️

Add 1 to a letter's number to get the NEXT letter! A becomes B.

letter = 'A'
next_letter = chr(ord('A') + 1)
print(next_letter)

Your Spy Name 🕶️

Make a fun secret agent message!

print('Agent 🕵️ reporting in!')
print('Mission: keep it secret 🤐')

Quick Check ✅

What does chr(65) give us?

Code Beginner! 🏆

Great start! You learned:

  • What a secret code is 🔐
  • How to flip text backwards ⏪
  • That letters have numbers with ord 🔢
  • How to turn numbers into letters with chr 🔡

Next: shift letters to make a real cipher! ➡️

Frequently asked questions

Is the “What Is a Code?” lesson free?

Yes — the full text of “What Is a Code?” 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 “What Is a Code?”?

Hide messages. 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 1 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “What Is a Code?” 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 Code?
  2. Shifting Letters
  3. Encoding a Message
  4. Decoding a Message
← Back to Coding for Kids