num1 = int(input("Enter a number: ")) num2 = 0 while num2 != num1: num2=num2+1 print(num2) while num2 != 1: num2=num2-1 print(num2)