Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Swag face generator
- Procedure: Use random() and such to determine parts will appear
- Steps:
- 1) Start with the eyebrows
- 2) Add a few noses
- 3) Add the mouth(s)
- '''
- import random
- def face():
- Face = ""
- #Start with the eyebrows and eyes
- Brows = ["", "", "", "", ">"]
- Eyes = [":", ";"]
- Face += str(Brows[random.randrange(len(Brows))] * (random.randint(1, 3))) + str(Eyes[random.randrange(len(Eyes))])
- #Add a few noses
- Noses = ["^", "`", "'", ",", "~", "*"]
- Face += "".join([Noses[random.randrange(len(Noses))] for i in range(random.randrange(3))])
- #Add the mouth(s)
- Mouths = ["0", "O", "K", "L", "I", ")", "(", "]", "[", "{", "|", "\\", "/", "c", "U", "C", "S", "$", "3", "Y"]
- Face += (Mouths[random.randrange(len(Mouths))] * random.randint(1, 3))
- return Face
- file = open("D:\Faces.txt", "w")
- Str = "\n".join([face() for i in range(5000)])
- file.write(Str)
- file.close()
- print("done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement