Use exact words
print works. pritn does not.
BEFORE PYTHON
A way to write exact instructions a computer can run.
THREE SIMPLE RULES
print works. pritn does not.
In our first programs, Python starts at the top.
Quotes and parentheses have a job.
SAME JOB
Each language has its own rules. We will start with Python.
print("Hello")
RESULTHello
console.log("Hello")
RESULTHello
Console.WriteLine("Hello");
RESULTHello
A PEEK AHEAD
No need to learn them now. Just say hello.
name =
A box with a name remembers one thing.
if ?
A question helps code choose a path.
for ↻
Repeat a few steps without writing them again.
WHEN CODE NEEDS HELP
Every programmer meets them. We look calmly, one small clue at a time.
A tiny mistake makes the code do something unexpected.
We read, test, and fix one small clue at a time.
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
Try each tiny question. A wrong answer becomes something to review.
What is a programming language?
pritn("PyBot")What happens when Python reads this line?
print("1")
print("2")
print("3")Which line does Python run first?
Which line keeps all its symbols?
print("Hello")
console.log("Hello")One line is Python, one is JavaScript. What do they show?
In code, what is a bug?
Your code shows an error. What is a good next step?
Want a fresh start? Clear only this page.
Next, we will learn the keys used to write those rules.