0

Explain this code

i = 2 while i<=19: print(i+5) i*=7 #output 7 19

14th Jul 2020, 10:34 AM
Emon
3 Answers
+ 2
What are you misunderstanding in this code?
14th Jul 2020, 10:35 AM
Théophile
Théophile - avatar
+ 2
I will show you what you should have done by yourself. Are you lazy? 1st iteration - i = 2 - output i + 5 (7) - multiply i by 7 (i = 14) - i <= 19, we continue 2nd iteration - i = 14 - output i + 5 (19) - multiply i by 7 (i = 98) - i > 19, we break
14th Jul 2020, 10:43 AM
Théophile
Théophile - avatar
0
Explain full code Why and how output became 719???
14th Jul 2020, 10:39 AM
Emon