👩💻 Code
3rd Grade 🤖 Artificial Intelligence
Code is instructions written in a programming language that a computer can carry out. Every app, game, website and AI system is built from code that people wrote.
A programming language is a precise language for writing algorithms so a computer can follow them. There are many programming languages, and each one has its own rules. Kids can code too — for example, in block-based languages where you drag and snap blocks together, and each block is a command like “move 10 steps” or “repeat 4 times.”
In AI systems, the code defines how the model is built, how it trains and how it’s used — but the model gets its “knowledge” from the data. Today there are AI tools that help write code, but programmers still need to understand the code, test it and fix mistakes, which are called “bugs.”
A common mistake is thinking a computer “understands what you meant.” A computer does exactly what the code says — even if it’s a mistake. One period in the wrong place can make a program stop working. That’s why coding teaches you to think in an organized way, break a problem into steps and hunt for mistakes patiently.
For example
- A small program that moves a character across the screen when you press an arrow key.
- Website code that decides what color a button is and what happens when you click it.
- A simple game the class built with coding blocks.
- A bug: a game where the character walks through walls because someone forgot to write a condition.
📌 Remember: Code = exact instructions in a programming language. The computer does exactly what’s written — mistakes too.
Quick quiz
What is code?
What is a “bug”?
What does a computer do when there’s a mistake in the code?