Introduction to Programming

Lesson 1 of 7

What is coding?

Discover what coding is, how computers follow instructions, and why Python is a fantastic first language.

🟢 Beginner 50 XP

Learn it

Computers are brilliant at doing things super quickly, but they are not actually smart on their own. They cannot think or guess what you want. Instead, they need a human to give them clear, step-by-step instructions.

Coding is simply the art of writing those instructions using a language the computer understands. Python is one of the most popular programming languages in the world because it is clean, powerful, and reads very much like plain English.

Key terms

Code
The set of written instructions given to a computer in a specific programming language.
Program
A complete, executable collection of code designed to perform a specific task or solve a problem.
Syntax
The exact grammatical rules and punctuation requirements of a programming language.
Interpreter
A program that reads and executes code line by line without needing prior compilation.

How Code Turns into Action

Follow the journey of a single line of Python from your keyboard to the computer screen.

  1. 1Writing Source Code: You type an instruction such as print in a text editor following Python syntax rules.
  2. 2Parsing Syntax: The Python interpreter checks your text to make sure there are no typos or missing brackets.
  3. 3Translation: The interpreter converts valid source code into bytecode and low-level machine instructions.
  4. 4Execution: The central processing unit processes the instructions and displays the result on your monitor.

Your Very First Python Command

pythonprint("Hello, CodeQuest Adventurer!")
print("Your journey into programming starts today.")

The print function tells Python to output whatever text is placed inside the speech marks to the screen.

Try it

Determine whether each statement about computer code is real or fake.

Computers can automatically guess your intentions even if your code has spelling errors.

Python code is executed line by line by an interpreter program.

High-level programming languages are designed to be readable by humans.

Code only runs on desktop computers and cannot work on games consoles or cars.

Challenge

Write two print statements in Python: one displaying your favourite game, and another displaying your player name.

Pick whichever way suits you — every mode earns the same bonus XP.

Write at least 40 more characters to submit.

Mark your own work

Guided walkthrough — 0/5 clues revealed

  1. Clue 1 locked — reveal it only if you get stuck.
  2. Clue 2 locked — reveal it only if you get stuck.
  3. Clue 3 locked — reveal it only if you get stuck.
  4. Clue 4 locked — reveal it only if you get stuck.
  5. Clue 5 locked — reveal it only if you get stuck.

Each clue costs 3 XP (never below 13 XP). You'd earn 25 XP right now.

Extension: Try printing an ASCII art smiley face using punctuation characters inside your print statement.

Quiz time

Question 1 of 4Score 0

What is the primary purpose of writing computer code?