Search Header Logo
pyhon

pyhon

Assessment

Presentation

Computers

11th Grade

Easy

Created by

أروى حوّا

Used 8+ times

FREE Resource

33 Slides • 11 Questions

1

media

Introduction To Loops In Python

​Arwa Hassan

2

Learning objective 

By the end of this lesson, you will be able to:

 

1-Learn what a loop is.

2-Why do we use a loop in programming?

3-Types of loops in python.

4- How to execute a loop using python.

5-Write different programs in python using loops.

Some text here about the topic of discussion

3

media

4

media

5

media

6

Open Ended

Why do we use a loop in programming?

7

media

8

media

9

media

11

media

12

media

13

media

14

Multiple Choice

What is the output?

 

for N in range(3):  

print("Mohammad", N )

1

Mohammad 1

Mohammad 2

Mohammad 3

2

Mohammad 0

Mohammad 1

Mohammad 2

3

Error

4

Mohammad0

Mohammad1

Mohammad2

15

Multiple Choice

for N in range(5): 

print("Mohammad", N+2 )

1

Mohammad 2

Mohammad 3

Mohammad 4

Mohammad 5

Mohammad 6

2

Mohammad 2

Mohammad 4

Mohammad 6

3

Mohammad 0+2

Mohammad 1+2

Mohammad 2+2

Mohammad 3+2

Mohammad 4+2

4

Error

16

media

17

media

18

media

19

media

20

Open Ended

What if you added the third parameter?

Copy the result and answer what does the third parameter do?

21

​you will be able to increment the sequence with the number

Grade 11 ​

22

Open Ended

Question image

Hint :

If we have a variable called ( number ) and it has a value of 2

print(number * ("!" ) )

would result

( !! )

23

media

24

Open Ended

Question image

What is the different between code1 and code2?

25

media

26

Open Ended

Before we continue with the loop!

What is the Boolean variable ??

27

media

28

media

29

Open Ended

Question image

What is the effect of having the space before else?

What are the outputs in the first example and the second one?

30

media

31

Exercise:

Write a program that repeats one sentence three times.

Or

  • Write a program that prints from 0 to 10 except for 3 or 6.

Or

  • Write a program using for loop to print how many times the user enters the password incorrectly.

32

media

33

media

34

media

​Nested loop

​Grade 11

35

​What is the nested loop?

A nested loop is a loop inside another loop.

Outer loop.

Inner loop.​

Some text here about the topic of discussion

36

media

37

Multiple Choice

Question image

How many times the print statement will be executed

1

5 times

2

3 times

3

15 times

4

1 time

38

media

39

media

40

media

41

media

42

media

43

Open Ended

What have you learned today ?!

44

Open Ended

Please give feedback, and tell me from 1 to 10 how much you understood the lesson. How can I improve the lesson?

media

Introduction To Loops In Python

​Arwa Hassan

Show answer

Auto Play

Slide 1 / 44

SLIDE