> For the complete documentation index, see [llms.txt](https://code-for-life.gitbook.io/python-den/DGiFT28ihVJK7ghZQHqu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-for-life.gitbook.io/python-den/DGiFT28ihVJK7ghZQHqu/learning-to-program-using-python.md).

# Learning to program using Python

This is a collection of teaching slides with supporting lesson plans and guides that you can use to teaching pupils how to program using Python. We are continuing to add more lessons.

Please note that these are not necessarily individual lessons, some will take less than a lesson and some will take more. Please plan your own lessons, depending on your context and pupils.&#x20;

We would appreciate you taking some time to feedback to us. Your thoughts on how useful the lessons are, whether you feel there need to be some structural changes and where you would use the sessions would be most gratefully received. [Feedback here](https://usabi.li/do/b0b159bdb111/cf4f)

#### Please test out our [assessments here](https://code-for-life.gitbook.io/code-for-life-test-space/)  <a href="#learning-objectives" id="learning-objectives"></a>

[Watch on YouTube](https://youtu.be/ko4nrr4kDzA)

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwAuC4Q5WQz4ea2O2b2JP%2Fuploads%2FIrjfLoafNqq05voj35c1%2FPython%20%20Den%20-%20Introduction.mp4?alt=media&token=c2e0fce7-5b3a-47e8-8799-5d4b129ec6b5>" %}
Introduction to Python den
{% endembed %}

{% file src="/files/SLP8Ky1eGSpDLJPP5osk" %}

### How this course maps to the National Curriculum in England

The National curriculum in England specifies a programme of study for Computing. These lessons support teaching the programming aspects of the following Key Stage 3 programme of study.

> **Key Stage 3 (extract)**
>
> Pupils should be taught to:
>
> * use logical reasoning to compare the utility of alternative algorithms for the same problem
> * use 2 or more programming languages, at least one of which is textual, to solve a variety of computational problems; make appropriate use of data structures \[for example, lists, tables or arrays]; design and develop modular programs that use procedures or functions
>
> [Link](https://www.gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study/national-curriculum-in-england-computing-programmes-of-study) to the National curriculum in England: computing programmes of study

They also specifically cover these sections which are detailed in the Key Stage 2 programme of study, using Python rather than a block-based language. You might find that your pupils have not encountered these concepts before Key Stage 3.

> **Key Stage 2 (extract)**
>
> Pupils should be taught to:
>
> * design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts
> * use sequence, selection, and repetition in programs; work with variables and various forms of input and output
> * use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
>
> [Link](https://www.gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study/national-curriculum-in-england-computing-programmes-of-study) to the National curriculum in England: computing programmes of study

### Summary of concepts taught in each lesson

* [**Lesson 1: Output, Operators and Data**](/python-den/DGiFT28ihVJK7ghZQHqu/python-1-output-operators-and-data.md) - the basics of Python starting from "Hello world!" and covering common errors, mathematical operators and data types
* [**Lesson 2: Variables, Input and Casting**](/python-den/DGiFT28ihVJK7ghZQHqu/python-2-variables-input-and-casting.md) - `input` in Python, the use of variables and using `int()` and `float()` to cast data values
* [**Lesson 3: Selection**](/python-den/DGiFT28ihVJK7ghZQHqu/python-3-selection.md) - using `if...elif...else` to make decisions in Python
* [**Lesson 4: Complex Selection**](/python-den/DGiFT28ihVJK7ghZQHqu/python-4-complex-selection.md) - complex selection with nested loops and some focus on debugging skills
* [**Lesson 5: Iteration using while loops**](/python-den/DGiFT28ihVJK7ghZQHqu/python-5-iteration-part-1.md) - a first loop at iteration (looping/repetition) using `while` loops
* [**Lesson 6: Iteration using while loops in Python**](/python-den/DGiFT28ihVJK7ghZQHqu/python-6-iteration-part-2.md)  - a further look at while loops with repeating input, totalling and counting
* [**Lesson 7: Selection in a loop**](/python-den/DGiFT28ihVJK7ghZQHqu/python-7-selection-in-a-loop.md) - extending the use of `while` loops with `if...elif...else`&#x20;
* [**Lesson 8: Indeterminate iteration**](/python-den/DGiFT28ihVJK7ghZQHqu/python-8-indeterminate-loops.md) **-** using `while` loops with conditions
* [**Lesson 9: String manipulation**](/python-den/DGiFT28ihVJK7ghZQHqu/python-9-string-manipulation.md) - the use of string indexes and iteration
* [**Lesson 10: 1D Lists**](/python-den/DGiFT28ihVJK7ghZQHqu/python-10-1d-lists.md) - the use of lists in single-dimension lists and iteration
* [**Lesson 11: Using for loops**](/python-den/DGiFT28ihVJK7ghZQHqu/python-11-using-for-loops.md) - using counted `for` loops
* [**Lesson 12: 2D Lists**](/python-den/DGiFT28ihVJK7ghZQHqu/python-12-2d-lists.md)
* [**Lesson 13 - Modular Programming**](/python-den/DGiFT28ihVJK7ghZQHqu/python-13-procedures-and-functions.md)
