Created
April 25, 2018 06:48
-
-
Save clamytoe/9a05654e93472b495dfa62b10a4c1407 to your computer and use it in GitHub Desktop.
print_stuff.py
This file contains hidden or 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
| """ | |
| FB Challenge: https://www.facebook.com/groups/251560641854558/permalink/622857261391559/ | |
| """ | |
| def printStuff(num): | |
| start = ''.join(list(map(str, range(1, num + 1)))) | |
| for x in range(num, 0, -1): | |
| print(f'{x}{start[1:num]}') | |
| num -= 1 | |
| print() | |
| printStuff(5) | |
| printStuff(4) | |
| printStuff(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment