☰ Contents · Computing

Repeating algorithms

Lessons 16–17 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
Answers are for parents and teachers.
1
Write in words (briefly) the calculation of the sum of numbers from 1 to 100 with three kinds of loop.
2
S = 0; for i = 2, 4, 6, 8 do S = S + i. What is S?
3
P = 1; for i from 2 to 6 do P = P · i. What is P?
4
Find the sum of the multiples of 6 from 1 to 30.
5
Calculate y = x³ – 2x for x = 3.