Last active
January 20, 2020 11:51
-
-
Save femiabimbola/7bc44b49b2e9c61b3f9c8249a42d8e14 to your computer and use it in GitHub Desktop.
How to print a range of number in reverse order with Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maximum = int(input("Please Enter the Maximum integer Value : ")) | |
minimum = int(input("Please Enter the Minimum integer Value : ")) | |
if ( maximum < minimum): | |
print(" The maximum number should be greather than minimum number") | |
else: | |
print("List of Natural Numbers from {0} to {1} : ".format(maximum, minimum)) | |
while ( maximum >= minimum): | |
print (maximum, end = ' ') | |
maximum = maximum - 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment