Last active
December 21, 2021 02:01
-
-
Save maxfire2008/5f5a8351bbfa33c596c9601777a3d55b to your computer and use it in GitHub Desktop.
pyramid generator
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
import random | |
def leftside(o,c): | |
if type(o) == str: | |
o = [o] | |
for x in range(c): | |
print(random.choice(o)*(x+1)) | |
def centered(o,c,sc,ditchright=True): | |
if type(o) == str: | |
o = [o] | |
maxlength = c | |
for x in range(c): | |
genright = "" | |
if not ditchright: | |
genright = (sc*(maxlength-(x+1))) | |
print((sc*(maxlength-(x+1)))+(random.choice(o)*((x+1)*2))+genright) | |
print("""Try using 5 spaces for Discord""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment