Lesson 4

Python - Lesson 4 
Year 7 
1 / 17
next
Slide 1: Slide

This lesson contains 17 slides, with interactive quizzes, text slides and 2 videos.

Items in this lesson

Python - Lesson 4 
Year 7 

Slide 1 - Slide

KO:  To be-able to explain how Iteration is used in programming.
All
- To be-able identify why iteration is needed in programming.

Most 
- To be-able to fix some code that uses iteration

Some
- To be-able to explain where iteration might be used in programming.

Slide 2 - Slide

Recap - printing
Can you "print" something to the screen?

Slide 3 - Slide

Recap - Using Variables
Can you use a variable that takes an input from a user. And then uses it in a sentence?

Slide 4 - Slide

What would the below code do?

Number = "50"
print("Number")
A
print "Number" to the screen
B
print "50" to the screen

Slide 5 - Quiz

What is the correct definition of a variable?
A
something that only works if a condition is met
B
A container that holds a value
C
is a loop that repeats
D
A type of computer virus

Slide 6 - Quiz

What is a selection statement?
A
A statement that prints text
B
A statement that allows for decision-making
C
A statement that defines a variable
D
A statement that loops through code

Slide 7 - Quiz

What is a 'Condition'?

Slide 8 - Slide

Coding in Iteration
This is the process of breaking down a problem or task into smaller, manageable parts and working on each part step by step until the desired outcome is achieved.

Slide 9 - Slide

Slide 10 - Video

While Loop - Example 1

Slide 11 - Slide

While Loop - Example 2 

Slide 12 - Slide

Why do you think iteration is important in coding?

Slide 13 - Slide

Can you think of a program where iteration could be used?

Slide 14 - Slide

What is wrong with this code?
Click here

First person to fix the code, get's a golden ticket!

Slide 15 - Slide

What is wrong with this code?

Slide 16 - Slide

Slide 17 - Video