Learning objective
Text Coding
Text-Based Coding
Transitioning from visual block coding to typed programming syntax, strict language rules, and text-based program execution.
Step 1: Code Typing
Recognise that text code consists of typed letters, numbers, and symbols requiring precise keyboard entry.
Let's Go!
Learn
Text-based coding uses typed words and punctuation instead of drag-and-drop blocks. Computers require exact spelling and matching symbols to execute instructions. In computing, written symbols and structured rules allow humans to communicate precise instructions to computers. As you explore the interactive Python Console Simulator below, focus on how to type text code statements without missing letters or quotes.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Typing First Commands
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identifies typed text code as instructions for a computer.
Types simple programming commands following a visual guide.
Accurately types text code statements without missing letters or quotes.
Explains why exact typing is required for computers to process text code.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: See-Think-Wonder
Teacher notes: Facilitate the See-Think-Wonder routine for 2โ3 minutes. Encourage students to connect the prompt to Form (Written symbols and structured rules allow humans to communicate precise instructions to computers.).
Achievement pathway
- Foundation: Identifies typed text code as instructions for a computer.
- Developing: Types simple programming commands following a visual guide.
- Secure: Accurately types text code statements without missing letters or quotes.
- Mastering: Explains why exact typing is required for computers to process text code.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.01.B.1.1 โ Recognise that text code consists of typed letters, numbers, and symbols requiring precise keyboard entry.
PYP: Form ยท Written symbols and structured rules allow humans to communicate precise instructions to computers.
Learner profile: Inquirer
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "What replaces drag-and-drop blocks in text-based programming?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 2: Step 2: Syntax Rules
Complete the previous learning check to unlock this next level.
Step 2: Syntax Rules
Follow strict syntax rules including capitalization, parentheses, and quotes when typing code statements.
Learning objective
Students learn the core rules of text syntax including function names, parentheses, and string quotes.
Let's Go!
Learn
Syntax is the grammar of programming languages. In Python, function names are case-sensitive, arguments sit inside parentheses (), and text strings must be enclosed in quotation marks. In computing, computer languages rely on strict syntax structures to interpret human logic consistently. As you explore the interactive Python Console Simulator below, focus on how to write syntactically correct output statements using proper punctuation.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Fixing Syntax Errors
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identifies parentheses and quotes in a line of text code.
Distinguishes between valid text commands and syntax errors.
Writes syntactically correct output statements using proper punctuation.
Teaches peers how to fix syntax errors like missing brackets or unclosed quotes.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Think-Pair-Share
Teacher notes: Facilitate the Think-Pair-Share routine for 2โ3 minutes. Encourage students to connect the prompt to Function (Computer languages rely on strict syntax structures to interpret human logic consistently.).
Achievement pathway
- Foundation: Identifies parentheses and quotes in a line of text code.
- Developing: Distinguishes between valid text commands and syntax errors.
- Secure: Writes syntactically correct output statements using proper punctuation.
- Mastering: Teaches peers how to fix syntax errors like missing brackets or unclosed quotes.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.02.B.1.2 โ Follow strict syntax rules including capitalization, parentheses, and quotes when typing code statements.
PYP: Function ยท Computer languages rely on strict syntax structures to interpret human logic consistently.
Learner profile: Communicator
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "Which Python statement is written with correct syntax?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 3: Step 3: Sequential Scripts
Complete the previous learning check to unlock this next level.
Step 3: Sequential Scripts
Write and execute multi-line text scripts that run instructions sequentially from top to bottom.
Learning objective
Students write multi-line text programs that execute sequence steps in precise order.
Let's Go!
Learn
Text programs execute line by line, starting at line 1 and moving downward. Changing the order of lines changes the sequence of output actions. In computing, sequential code execution creates predictable outcomes in automated story narratives and calculations. As you explore the interactive Python Console Simulator below, focus on how to predict exact output sequence of complex multi-line text programs.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Building a Dialogue Script
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Traces the order of lines in a 3-line text script.
Constructs a multi-line text script to display sequential story dialogue.
Predicts exact output sequence of complex multi-line text programs.
Reorders script lines to optimize output clarity and logical flow.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Predict & Verify
Teacher notes: Facilitate the Predict & Verify routine for 2โ3 minutes. Encourage students to connect the prompt to Change (Sequential code execution creates predictable outcomes in automated story narratives and calculations.).
Achievement pathway
- Foundation: Traces the order of lines in a 3-line text script.
- Developing: Constructs a multi-line text script to display sequential story dialogue.
- Secure: Predicts exact output sequence of complex multi-line text programs.
- Mastering: Reorders script lines to optimize output clarity and logical flow.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.03.B.1.3 โ Write and execute multi-line text scripts that run instructions sequentially from top to bottom.
PYP: Change ยท Sequential code execution creates predictable outcomes in automated story narratives and calculations.
Learner profile: Thinker
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "In what order does a text program execute lines of code?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 4: Step 4: Variables & Input
Complete the previous learning check to unlock this next level.
Step 4: Variables & Input
Store, manipulate, and format typed text variables and interactive user inputs.
Learning objective
Students learn to create text variables, collect user inputs with input(), and output formatted responses.
Let's Go!
Learn
Variables store values using an assignment operator (=), like name = 'Alex'. The input() function asks the user a question and saves their typed response into a variable for later use. In computing, storing dynamic information in variables enables personalized and interactive computer programs. As you explore the interactive Python Console Simulator below, focus on how to format string concatenation and f-strings to display dynamic personalized outputs.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Building a Greeting Generator
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identifies variable assignment using the equals sign (=) in text code.
Captures user input using input() and stores it in a named variable.
Formats string concatenation and f-strings to display dynamic personalized outputs.
Designs an interactive text chatbot that prompts for user data and remembers choices.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Connect-Extend-Challenge
Teacher notes: Facilitate the Connect-Extend-Challenge routine for 2โ3 minutes. Encourage students to connect the prompt to Connection (Storing dynamic information in variables enables personalized and interactive computer programs.).
Achievement pathway
- Foundation: Identifies variable assignment using the equals sign (=) in text code.
- Developing: Captures user input using input() and stores it in a named variable.
- Secure: Formats string concatenation and f-strings to display dynamic personalized outputs.
- Mastering: Designs an interactive text chatbot that prompts for user data and remembers choices.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.04.B.1.4 โ Store, manipulate, and format typed text variables and interactive user inputs.
PYP: Connection ยท Storing dynamic information in variables enables personalized and interactive computer programs.
Learner profile: Principled
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "Which Python line correctly stores user input into a variable named 'user_age'?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 5: Step 5: Conditionals & Indent
Complete the previous learning check to unlock this next level.
Step 5: Conditionals & Indent
Write structured if/else conditional statements using comparative operators and strict block indentation.
Learning objective
Students write text-based if/elif/else statements using comparison operators (==, >, <) and 4-space indentation.
Let's Go!
Learn
Text-based decisions use if, elif, and else keywords followed by a colon (:). Code inside each decision branch MUST be indented (typically 4 spaces) to show it belongs to that branch. In computing, conditional structures allow text programs to make dynamic decisions based on varying criteria. As you explore the interactive Python Console Simulator below, focus on how to write conditional text programs using dynamic comparison conditions.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Building a Passcode Checker
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Identifies the if and else keywords in a Python script.
Applies correct indentation to code blocks inside if/else branches.
Writes conditional text programs using dynamic comparison conditions.
Constructs multi-branch decision trees using if, elif, and else clauses.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: 4 Cs (Connections, Concepts, Changes, Challenges)
Teacher notes: Facilitate the 4 Cs (Connections, Concepts, Changes, Challenges) routine for 2โ3 minutes. Encourage students to connect the prompt to Perspective (Conditional structures allow text programs to make dynamic decisions based on varying criteria.).
Achievement pathway
- Foundation: Identifies the if and else keywords in a Python script.
- Developing: Applies correct indentation to code blocks inside if/else branches.
- Secure: Writes conditional text programs using dynamic comparison conditions.
- Mastering: Constructs multi-branch decision trees using if, elif, and else clauses.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.05.B.1.5 โ Write structured if/else conditional statements using comparative operators and strict block indentation.
PYP: Perspective ยท Conditional structures allow text programs to make dynamic decisions based on varying criteria.
Learner profile: Knowledgeable
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "What must follow an 'if' condition line in Python, and what must happen to the code line inside the branch?" with a teacher or teaching assistant.
Teacher override: allow
Locked level
Level 6: Step 6: Loops & Functions
Complete the previous learning check to unlock this next level.
Step 6: Loops & Functions
Define reusable text functions with def and construct count-controlled for loops and condition-controlled while loops.
Learning objective
Students define custom functions with def and implement text for/while loops to solve complex programming tasks.
Let's Go!
Learn
Use `for i in range(n):` to repeat code `n` times, or `while condition:` for continuous execution. Use `def function_name():` to wrap reusable code blocks into custom named functions. In computing, functions and loops allow text programmers to build modular, efficient, and scalable software solutions. As you explore the interactive Python Console Simulator below, focus on how to define custom functions with parameters to eliminate repeated code.
Type Python code in the IDE to view real-time AST node tree parsing.
| Identifier | Type | Value | Scope |
|---|---|---|---|
| No active variables in memory. Assign variables (e.g. score = 100) to inspect. | |||
Apply Simulator Skills โข Try it yourself
Building a Mini Text Game Engine
๐ Open a practice space
Or try locally: ๐ Raspberry Pi Python
๐ Student Project GuideSuccess Criteria & WAGOLL (What A Good One Looks Like)
๐ฏ Task Success Criteria (Rubric)
Recognizes for, while, and def keywords in a Python script.
Constructs a for loop in Python to repeat an action a fixed number of times.
Defines custom functions with parameters to eliminate repeated code.
Builds a complete text-based adventure game utilizing functions, loops, variables, and conditionals.
๐ What A Good One Looks Like (WAGOLL)
When you finish creating your project in your software, copy the share link or take a screenshot and publish it onto your student portfolio website!
Reflect
Learning check
Teacher setup, curriculum links and progress descriptors
Spark support
Routine: Headline
Teacher notes: Facilitate the Headline routine for 2โ3 minutes. Encourage students to connect the prompt to Reflection (Functions and loops allow text programmers to build modular, efficient, and scalable software solutions.).
Achievement pathway
- Foundation: Recognizes for, while, and def keywords in a Python script.
- Developing: Constructs a for loop in Python to repeat an action a fixed number of times.
- Secure: Defines custom functions with parameters to eliminate repeated code.
- Mastering: Builds a complete text-based adventure game utilizing functions, loops, variables, and conditionals.
Curriculum links
Curriculum strand: coding/text-coding
Outcome: TEXT.06.B.1.6 โ Define reusable text functions with def and construct count-controlled for loops and condition-controlled while loops.
PYP: Reflection ยท Functions and loops allow text programmers to build modular, efficient, and scalable software solutions.
Learner profile: Reflective
Competency tags
Gate support
Accessibility alternative: Students may verbally explain or point to the correct answer for "Which keyword is used in Python to define a new custom reusable function?" with a teacher or teaching assistant.
Teacher override: allow




