Created
June 29, 2015 21:01
-
-
Save ronsims2/50f568158f18605c24d7 to your computer and use it in GitHub Desktop.
Snigs - A class that generated scrabbled movie titles. Add a bit of entertainment to boring logs.
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
import random as r | |
class snigs: | |
def __init__(self, wordlist = None): | |
self.addquestions(wordlist) | |
@staticmethod | |
def getwords(): | |
questions = [ | |
'Coming to America', | |
'Boomerang', | |
'The Adventures of Pluto Nash', | |
'Moving', | |
'Jo Jo Dancer', | |
'Brewster\'s Millions', | |
'The Nutty Professor', | |
'The Toy', | |
'Harlem Nights', | |
'Car Wash', | |
'Blazing Saddles', | |
'Bustin\' loose', | |
'The Wiz', | |
'Signs', | |
'The Last Airbender', | |
'The Sixth Sense', | |
'Unbreakable', | |
'After Earth', | |
'The Village', | |
'Lady in the Water' | |
] | |
return questions | |
def addquestions(self, wordlist = None): | |
if wordlist != None: | |
self.questions = wordlist | |
else: | |
self.questions = snigs.getwords() | |
self.questioncount = len(self.quesions) | |
def getsnig(): | |
rando = r.randint(0, self.snigcount) | |
question = self.questions[rando] | |
def snigify(self, text): | |
snig = '' | |
text2 = text | |
textcount = len(text) | |
if (textcount > 0): | |
while len(snig) < textcount: | |
rando = r.randint(0, ) | |
wds = snigs.getwords() | |
print(wds) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment