Add a.py
This commit is contained in:
17
a.py
Normal file
17
a.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from random import randint
|
||||||
|
from string import ascii_lowercase
|
||||||
|
|
||||||
|
vowels = "aeiouy" # y as a stylistic choice
|
||||||
|
consonants = [c for c in ascii_lowercase if c not in vowels]
|
||||||
|
|
||||||
|
def randchar(s):
|
||||||
|
return s[randint(0, len(s) - 1)]
|
||||||
|
|
||||||
|
for _ in range(10):
|
||||||
|
for _ in range(7):
|
||||||
|
print((randchar(vowels), randchar(consonants))[randint(0, 1)], end="")
|
||||||
|
print()
|
||||||
|
|
||||||
|
# and then you just pick the one that looks nicest
|
||||||
|
# i thought about having some check that doesn't put too many vowels or consonants next to each other but like
|
||||||
|
# effort
|
||||||
Reference in New Issue
Block a user