-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscriptGenerator.py
73 lines (55 loc) · 1.83 KB
/
scriptGenerator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# scriptGenerator.py
# the basics for Heather Anne Campbell's Magic Sketch Macine
from numpy import random
import sys
import random
#global unpopulated lists
jobsList = []
adjList = []
placeList = []
celebList = []
#this function populates the lists
def incrementList(list):
for i in range (0,10):
userin = input("Please enter word #" + str(i + 1) +"\n")
list.append(userin)
print(list)
# prompt user for what type of list, then create lists
print("Welcome to the magic sketch machine!")
print("\nCreate a list of jobs.")
incrementList(jobsList)
print("\nCreate a list of adjectives.")
incrementList(adjList)
"""print("Create a list of places and times.")
placeList = createList()
print("Create a list of celebrities and characters.")
celebList = createList()
"""
#DICTIONARY METHOD? FOR RANDOM VALUES LATER
#this indexes the lists for random selection
#listDict = {1:jobsList,2:adjList,3:placeList,4:celebList}
#
#listDict.get(random.randint(0,len(listDict)))
#TODO: randomly pop value out of list, into new list of combinations
#this function randomly returns a list value, then removes it from the original list
def randomGrab(list):
while len(list) > 0:
return_value = random.choice(list)
list.remove(return_value)
return return_value
#this is the list of combined words
pitches = []
#this function combines two strings and returns the new value
def combine(var1,var2):
pitches.append( str(var1) + ' ' + str(var2) )
return pitches
#this function takes grabs two lists, then combines those words 10 times
def pitchCombiner(list,list2):
for i in range (0,10):
wordOne = randomGrab(list)
wordTwo = randomGrab(list2)
combine(wordOne, wordTwo)
pitchCombiner(adjList, jobsList)
print("\nThese are your funny ideas.")
print (pitches)
print("Now you're Monty Python")