cant unterstand | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

cant unterstand

n = 3 while n > 0 : print(n + 1) n-=1 else: print(n) The counsel 4 3 2 0

3rd Sep 2022, 7:29 AM
RazaHussain Khalid
2 Answers
+ 4
What exactly don't you understand? Can you specify? Go through the loop step by step to find out how the outputs come.
3rd Sep 2022, 7:35 AM
Lisa
Lisa - avatar
+ 4
I hope this explanation helps. Please save to review as I will delete in a few days https://code.sololearn.com/caHXuG1FBQGM/?ref=app
3rd Sep 2022, 9:03 AM
Rik Wittkopp
Rik Wittkopp - avatar