☰ Contents · Computing

Loop practice and a review test

Lessons 42–43 · 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
Find the sum 20 + 24 + 28 + … + 60.
2
What is the starting value of p in the program that finds the product n! of the numbers from 1 to n?
3
x is typed. Write a program that prints x // 2 if it is even and 3 * x + 1 if it is odd (22 for 7).
4
Write the result of print("Salom,", "Ali", end="!").