lesson 3.1.1 from blocks to text
Graduating to Python

Hello and welcome to text-based programming! You have already learned how to think like a programmer using a block-based languageI have no idea what this means in Key Stage 2. Now, you are going to learn how to write programs like a professional, using a text-based languageI have no idea what this means called PythonA high-level, text-based programming language known for its clear, readable syntax..
Learning Outcomes
The Building Blocks (Factual Knowledge)
The Connections and Theories (Conceptual Knowledge)
The Skills and Methods (Procedural Outcomes)
Recall that a high-level language requires a translator (interpreter) to be understood by a computer.
Describe a text-based language (Python) as a way to give precise instructions to a computer.
Describe a source code editor as a tool with features like syntax highlighting to help programmers.
Recall that a string is a data type for text and must be in quotes.
Recall that a comment starts with a # and is ignored by the computer.
Describe a syntax error as a "grammar" error that stops the program from running.
The Connections and Theories (Conceptual Knowledge)
Analyse the similarities and differences between a block-based language and a text-based language, concluding that both use the same core programming logic (e.g., sequence).
Explain why precise syntax is essential in a text-based language, whereas a block-based language prevents syntax errors by design.
The Skills and Methods (Procedural Outcomes)
Apply knowledge of an IDE to write a simple program using a text editor with syntax highlighting.
Apply the correct syntax to create comments in code to explain its purpose.
Create a simple program that displays a string of text using the
print() function.Digital Skill Focus: In this lesson, you will practice the skills of navigating a website and interacting with a live 'widget'.
Your New Coding Environment: The IDE
From now on, you'll be using an Integrated Development EnvironmentSoftware tools used to write code. Often include features like code editors, syntax highlighting, run-time environment, breakpoint / debugging tools etc., or IDEI have no idea what this means to help you to write, run and debug code. For this course, we will be using a special online Python "widget" IDE...

The Python Widget IDE
An IDE is just a program that bundles all the tools a programmer needs into one place. For us, they have three super-important parts:
A Code EditorI have no idea what this means: This is just like a text editor (like Notepad). This is where we write and save our main program, which is called our source codeI have no idea what this means.
An InterpreterLanguage translator which converts source code into object code one command at a time. Usually platform independent.: This is a behind the scenes program which takes our source code and converts it into a format that the computer can run.
A ShellAn alternative name for the interface of an interpreter.: We will see all our output here (like any text we print), and we can also use it to quickly test single lines of code and interact with our program.
Your first program
The first command (or function) every programmer usually learns is
print(). Its job is simple: it tells the computer to display whatever you put inside the parentheses (that's a fancy name for brackets) to the shell. When we want to print text, we have to tell Python that it is text. We do this by wrapping it in quotation marks (""). Any text inside quotes is called a stringA sequence of characters delimited with quotation marks..
Task 1 The Python Widget
To help you to get started, here is a simple Python Widget IDE for which runs right here, in the browser! We won't always be using this but it's useful to introduce you to a new concept so you don't have to create your own Python script on your computer.
Lines starting with a hash sign (
#) are comments. They are ignored by the interpreter but are useful for humans to explain how the code works.1
Try it out!
Follow the intructions carefully.
1
USE the script by clicking the RUN button. Can you see what happens?
2
MODIFY the script in the following ways...
What happens if you remove the brackets from the
print statement?What about removing the quotation marks from the
print statement?Does it still work if you CAPITALISE the word
print?Try changing the hash sign (
#) to something else or removing it completely. What happens?Reset the script before you move on by clicking the Reset button.
2
CREATE new stuff:
Add a new
print() statement on line 3 which outputs This is easy peasy :)Add a new comment on line 4 which says
# This is the end!Outcome: I can use the Python Widget to predict, run, investigate, modify and create Python code.

Last modified: September 18th, 2026
