Aug-31-2020, 11:58 PM
Let's walk through the code, line by line, and keep track of what
n
is.n = 3 # 3 while n > 0: # 3 print(n + 1, end=' ') # 3 (print 4) n -= 1 # 2 while n > 0: # 2 print(n + 1, end=' ') # 2 (print 3) n -= 1 # 1 while n > 0: # 1 print(n + 1, end=' ') # 1 (print 2) n -= 1 # 0 else: print(n) # 0