Last active
August 9, 2018 17:35
-
-
Save cedrickvstheworld/dd90b626a14acbc119b6a7f26844a1de to your computer and use it in GitHub Desktop.
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
# item 1 | |
i = 0 | |
while i <= 5: | |
asteriskshits = '*' * i | |
spacing = ' ' * (5 - i) * 2 | |
print( asteriskshits, spacing, asteriskshits) | |
i += 1 | |
# item 2 | |
i2 = 0 | |
while i2 <= 5: | |
asteriskshits = '*' * i2 | |
print(asteriskshits) | |
i2 += 1 | |
while i2 != 0: | |
asteriskshits = '*' * (i2 - 2) | |
print(asteriskshits) | |
i2 -= 1 | |
# common sense is valid right?? | |
# item 3 | |
i3 = 5 | |
while i3 >= 1: | |
asteriskshits = '*' * i3 | |
print(asteriskshits) | |
i3 -= 1 | |
while i3 != 4: | |
asteriskshits = '*' * (i3 + 2) | |
print(asteriskshits) | |
i3 += 1 | |
# item 4 | |
i4 = 10 | |
listx = list(range(10, 0, -1)) | |
while i4 != 0: | |
print(str(listx[:i4]).replace(',', ' ').replace('[', '').replace(']', '')) | |
i4 -= 1 | |
# item 5 | |
i5 = 0 | |
listx = list(range(1, 11)) | |
while i5 != 11: | |
print(str(listx[:i5]).replace(',', ' ').replace('[', '').replace(']', '')) | |
i5 += 1 | |
# item 6 | |
fucker = 0 | |
fuckingshit = list(range(1, 11)) | |
while fucker <= 9: | |
x = fuckingshit[fucker] * fuckingshit[fucker] | |
print((str(x) + ' ') * (fucker + 1)) | |
fucker += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment