AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Contents · Computing

The while loop and its practice

Lessons 44–45 · 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
In this program, what is k at the end?
Python
1n = 20
2k = 0
3while n > 1:
4    n //= 2
5    k += 1
2
Write a program that prints the odd numbers from 1 to 9 with while.
3
Find the product of the digits of a typed number (24 for 234).
4
Why is the starting value of p 1 in the product of digits program?
Story of the Week · The Khwarizmi WayThe fair standClose the week: all of this week’s subjects in one storyRead →