Learn / Python Level 1

Lesson 1: Hello, Python!

By the end you can: Make the computer print messages, add comments, and fix small mistakes.

1Recall

Question 1

1. What is a computer program?

Question 2

2. Which of these follows instructions exactly, even silly ones?

Question 3

3. Where have you seen code at work today?

2New idea

Python is a programming language: a way to write instructions that a computer understands. It is used to build games, websites, robots and even AI.

Our first instruction is print(). It shows a message on the screen. The message goes inside brackets and quotes.

  • Text in quotes is called a string: "Hello!"
  • Python runs your lines from top to bottom
  • A line starting with # is a comment. Python ignores it; it's a note for people
  • Spelling matters: print works, Print does not

Tip: Mistakes are normal! When Python finds one, it shows an error message. Read the last line: it tells you what went wrong.

3Show me

Press Run. Then change the messages and run it again.

This one has a mistake on purpose. Run it, read the error, then fix it.

4Challenge 1

5Challenge 2

6Check

Question 1

1. What does print("5 + 5") show?

Question 2

2. What does Python do with a line that starts with #?

Question 3

3. Which line is correct?

7At home

8Reflect

  • What did you make the computer say today?
  • Which error did you see, and how did you fix it?
  • What would you like your programs to do next?
Next: Lesson 2, Variables and questions →