Coding · Grade 9
Programming Foundations with Python
Learners see how the Python interpreter runs a program statement by statement, why indentation is part of the grammar and how comments work. They control output precisely with print's sep and end, classify and locate syntax, runtime and logic errors from messages and behaviour, and use types and built-in functions, including Python's round-half-to-even rule.
- 4 lessons
- About 80 minutes
- Check what you learned: 8 questions
- Ways to answer: choose an answer, put code in order, trace code, highlight a text, match pairs and type a number
What learners will discover
- Explain how Python executes a program: statements in order, indentation as structure, comments ignored.
- Predict and produce exact output with print, sep, end and new-line escapes.
- Classify errors as syntax, runtime or logic errors and locate them from messages and behaviour.
- Identify value types and predict the results of built-in functions such as len, abs, max, min and round.
Lessons
-
How a Python program runs 5 steps2 practiceabout 18 min
-
Output with print 5 steps3 practiceabout 20 min
-
Three kinds of errors 5 steps3 practiceabout 22 min
-
Types and built-in functions 5 steps3 practiceabout 20 min
-
Check what you learned 8 questions at the end
Keep exploring
More 9th grade coding
- 9th Grade Coding Worksheets10 printable worksheets
Guide for grown-ups
- How to start homeschooling: a step-by-step guide for familiesA guide for parents · 7 min read