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

Слайд 2

You will:

Understand definition of the Loops in python language;
Basic concept of iteration;
Apply ‘FOR’

loop to solve the problem.

chapter 4.1

LOOPS

Слайд 3

In computer programming, a loop is an order of instructions that repeats for

many times. Each repetition is called an iteration of the loop.

chapter 4.1

LOOPS

What is the Loop?

Слайд 4

Range(N)
[0,..,N-1]

chapter 4.1

LOOPS

Range:

Range(3)
[0,1,2]

Range(10,15)
[10,11,12,13,14]

Слайд 5

chapter 4.1

LOOPS

For i in range (5)
print (“Wash your hands!”)

Слайд 6

Example 1:

chapter 4.1

LOOPS

For i in range (100)
print (“I will not waste my time

on meaningless tasks!”)

Слайд 7

Example 2:

chapter 4.1

LOOPS

Write a code that prints all even numbers from 2 to

100 inclusively.

Слайд 8

Example 3:

chapter 4.1

LOOPS

Calculate the sum of even numbers till inputted number N

Слайд 9

Terminology

loop - тізбек - цикл
even - жұп - четные
iteration - итерация

- итерация
inclusively - қоса алғанда - включительно
trick - қулық - хитрость
to fix - түзету - исправлять
sum - сома - сумма
divisible - бөлінетін - делимый

chapter 10.1

Cell division types

Слайд 10

chapter 4.1

LOOPS

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.
Имя файла: “БІЛІМ-Инновация”-Халықаралық-қоғамдық-қоры.pptx
Количество просмотров: 104
Количество скачиваний: 0