Following Python program will print 10 to 1 numbers using while loop.
Expected Output: 10 9 8 7 6 5 4 3 2 1
Program Code:
number = 10
while number >= 1:
print(number, end=" ")
number = number - 1
Output of Program:
10 9 8 7 6 5 4 3 2 1
* * * * *
Expected Output: 10 9 8 7 6 5 4 3 2 1
Program Code:
Output of Program:
10 9 8 7 6 5 4 3 2 1
* * * * *
Expected Output: 1 2 3 4 5 6 7 8 9 10
Program Code:
Output of Program:
1 2 3 4 5 6 7 8 9 10
* * * * *