Lesson 4

Python - Lesson 4 
Year 7 
1 / 17
suivant
Slide 1: Diapositive

Cette leçon contient 17 diapositives, avec quiz interactifs, diapositives de texte et 2 vidéos.

Éléments de cette leçon

Python - Lesson 4 
Year 7 

Slide 1 - Diapositive

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 - Diapositive

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

Slide 3 - Diapositive

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

Slide 4 - Diapositive

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 - Diapositive

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 - Diapositive

Slide 10 - Vidéo

While Loop - Example 1

Slide 11 - Diapositive

While Loop - Example 2 

Slide 12 - Diapositive

Why do you think iteration is important in coding?

Slide 13 - Diapositive

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

Slide 14 - Diapositive

What is wrong with this code?
Click here

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

Slide 15 - Diapositive

What is wrong with this code?

Slide 16 - Diapositive

Slide 17 - Vidéo