Why does this code repeatedly take input and never terminate? I want to know how is the input related to the condition inside the while loop. The input command is outside the while loop so it should be independent of the condition.
n = input()
n = int(n)
count = 0
while n > 0:
if n% 10 ==0:
n =n/10
count = count +1
else :
n = n+1
count = count +1