Previous page

BEFORE PYTHON

What is a programming language?

A way to write exact instructions a computer can run.

THREE SIMPLE RULES

The details matter.

1

Use exact words

print works. pritn does not.

2

Put steps in order

In our first programs, Python starts at the top.

3

Keep the symbols

Quotes and parentheses have a job.

SAME JOB

Different languages. Same hello.

Each language has its own rules. We will start with Python.

PYTHON print("Hello")

RESULTHello

JAVASCRIPT console.log("Hello")

RESULTHello

C# Console.WriteLine("Hello");

RESULTHello

A PEEK AHEAD

Tiny ideas you will meet.

No need to learn them now. Just say hello.

name =

Variables

A box with a name remembers one thing.

if ?

Conditionals

A question helps code choose a path.

for ↻

Loops

Repeat a few steps without writing them again.

WHEN CODE NEEDS HELP

Errors are clues, not failures.

Every programmer meets them. We look calmly, one small clue at a time.

01

A bug

A tiny mistake makes the code do something unexpected.

02

Debugging

We read, test, and fix one small clue at a time.

03

Compiling

Some languages translate code before the computer runs it.

You do not need to fix these today. Just remember: a clue can help.

YOUR TURN

What did you learn?

Try each tiny question. A wrong answer becomes something to review.

0Completed
7Not tried
0Review
01

What is it?

What is a programming language?

02

Exact words

pritn("PyBot")

What happens when Python reads this line?

03

Where to start

print("1") print("2") print("3")

Which line does Python run first?

04

Keep the symbols

Which line keeps all its symbols?

05

Same hello

print("Hello") console.log("Hello")

One line is Python, one is JavaScript. What do they show?

06

What is a bug?

In code, what is a bug?

07

An error appears

Your code shows an error. What is a good next step?

Your work is saved here.

Want a fresh start? Clear only this page.

BIG IDEA

A language gives code its rules.

Next, we will learn the keys used to write those rules.