Write a Python program that takes an integer input n from the user and prints all the numbers from n down to 0.
Example 1:
Input: n = 5
Output: 5 4 3 2 1 0
Example 2:
Input: n = 2
Output: 2 1 0
Use a while loop that continues as long as n is greater than or equal to 0.
n = int(input("Enter a number: "))
while n >= 0:
print(n)
n -= 1
NOTEOwing to browser caching, any code input into the Trinket IDE might carry over across page refreshes or when transitioning between different questions. To commence with a clean slate, either click on the 'Reset Button' found within the IDE's Hamburger icon (☰) menu or resort to using Chrome's Incognito Mode.