Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

✳✱*

While() or for()

Both are loops, but when would I use a for() loop over a while() loop?

Task

Now try worksheet 4

Variables

Remind me what a variable is

How do we declare a variable?

While loops

While loops are used to repeat a block of code (the bit that is indented) over and over until the statement on the first line becomes true

Revise, Recap, Review

Remember IF statements?

Python Lesson 4: WHILE loops

While Loops

Set out like an if statement

while lowercase

Colon at the end of the line

Indentation

DON'T indent anything you don't want to repeat!

Plenary

Two facts about loops in python

Learn more about creating dynamic, engaging presentations with Prezi