Skip to content

Instantly share code, notes, and snippets.

@ronsims2
Created June 29, 2015 21:01
Show Gist options
  • Save ronsims2/50f568158f18605c24d7 to your computer and use it in GitHub Desktop.
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.
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