Get ready: choose your Python
5–10 minsYour teacher will tell you which option to use. For this introductory lesson, the built-in editor is the quickest choice: it runs Python inside your browser and does not save or send your code to this website.
Nothing needs to be installed. Type and run code in the Python Lab below.
Open the built-in Python Lab ↓Search for Thonny on the school computer. Select File → New, type your code and press the green Run button.
Official Thonny website ↗For home use, ask an adult or IT administrator before installing software.
Official Python downloads ↗Start: think like a computer
print("Hello!")
print(4 + 5)
print("4 + 5")Which line displays a greeting? Which calculates an answer? Why does the final line behave differently?
Reveal the explanation
Quotation marks tell Python that something is text—a string. Without quotation marks, 4 + 5 is treated as a calculation.
Task 1: learn how to use the Python Lab
Your output will appear here.
Your code stays in this browser tab. The first run may take a few seconds while Python loads.
What you will learn
print() for text and calculations.Learn: output with print()
Output is information a computer sends out. In Python, the built-in print() function displays output on the screen.
print("Hello, world!")
print("I am learning Python.")Try it
- Run the example.
- Change the greeting.
- Add a third line introducing yourself.
Python Lab: practise output
Your output will appear here.
Your code stays in this browser tab. The first run may take a few seconds while Python loads.
Try: make Python calculate
Python can calculate inside a print statement. Combine an explanation with the result by separating items with commas.
print("35 + 26 =", 35 + 26)
print("23 - 7 =", 23 - 7)
print("7 × 21 =", 7 * 21)
print("155 ÷ 5 =", 155 / 5)Python Lab: calculations
Your output will appear here.
Your code stays in this browser tab. The first run may take a few seconds while Python loads.
Debug: become a bug detective
Programs must follow Python’s syntax rules. Each line below contains one mistake. Correct all four.
print("Welcome to Python)Print("Can you fix me?")print(There is a bug here)prnt("Nearly finished!")
Reveal the corrected code
print("Welcome to Python")
print("Can you fix me?")
print("There is a bug here")
print("Nearly finished!")Python Lab: fix the bugs
Your output will appear here.
Your code stays in this browser tab. The first run may take a few seconds while Python loads.
Challenge: create something worth sharing
Create a short program called About Me. It should be suitable to show your class but must not contain private information.
- A title made from symbols or ASCII characters
- At least four lines of text output
- At least one calculation
- A comment beginning with
# - Accurate brackets and quotation marks
Extension: make the output form a simple picture, pattern or joke.
Python Lab: create your program
Your output will appear here.
Your code stays in this browser tab. The first run may take a few seconds while Python loads.
Review: exit ticket
Create my lesson record
Your record gathers your Python programs, their latest output, your quiz result and your written reflection into one document.
Want the complete resource library?
LearnITwithMrC membership will include complete KS3 and GCSE Computing lessons, activities and revision materials.
Join the membership launch list