LOOPS
You will:
What is the Loop?
Range:
Example 1:
Example 2:
Example 3:
Terminology
Home task
2.07M
Category: lingvisticslingvistics

“БІЛІМ-Инновация” Халықаралық қоғамдық қоры

1. LOOPS

1
“БІЛІМ-Инновация”
Халықаралық қоғамдық қоры
CHAPTER 4.1
INFORMATICS - 8th grade
LOOPS
4-TERM
WEEK 1
2019-2020

2. You will:

LOOPS
chapter 4.1
You will:
• Understand definition of the Loops in python language;
• Basic concept of iteration;
• Apply ‘FOR’ loop to solve the problem.
INFORMATICS
4-term
week 1
2019-2020
2

3. What is the Loop?

LOOPS
chapter 4.1
What is the
Loop?
INFORMATICS
4-term
week 1
2019-2020
• In computer programming, a loop is an
order of instructions that repeats for
many times. Each repetition is called an
iteration of the loop.
3

4. Range:

LOOPS
chapter 4.1
Range:
INFORMATICS
4-term
Range(N)
Range(3)
Range(10,15)
[0,..,N-1]
[0,1,2]
[10,11,12,13,14]
week 1
2019-2020
4

5.

LOOPS
chapter 4.1
For i in range (5)
print (“Wash your hands!”)
INFORMATICS
4-term
week 1
2019-2020
5

6. Example 1:

LOOPS
chapter 4.1
Example 1:
For i in range (100)
print (“I will not
waste my time on
meaningless
tasks!”)
INFORMATICS
4-term
week 1
2019-2020
6

7. Example 2:

LOOPS
chapter 4.1
Example 2:
Write a code that prints all even numbers from 2 to 100
inclusively.
INFORMATICS
4-term
week 1
2019-2020
7

8. Example 3:

LOOPS
chapter 4.1
Example 3:
Calculate the sum of even numbers till inputted number
N
INFORMATICS
4-term
week 1
2019-2020
8

9. Terminology

chapter 10.1
Cell division types
Terminology
loop - тізбек - цикл
even - жұп - четные
iteration - итерация - итерация
inclusively - қоса алғанда - включительно
trick - қулық - хитрость
to x - түзету - исправлять
sum - сома - сумма
divisible - бөлінетін - делимый
biology
4-term
week 1
2019-2020
9

10. Home task

LOOPS
chapter 4.1
Home task
1. Write a code that prints all odd numbers from 1 to
100. Example: 1 3 5 7 … 99 4.
2. Write a code that prints all numbers, divisible by 5,
starting from 1 to 1000. Example: 1 5 10 15 20 …
1000 5.
3. Write a code that will print sum of all numbers from
1 to 60 inclusively.
INFORMATICS
4-term
week 1
2019-2020
10
English     Русский Rules