-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchopt.py
More file actions
66 lines (44 loc) · 1.58 KB
/
chopt.py
File metadata and controls
66 lines (44 loc) · 1.58 KB
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
#!/usr/bin/env python3
"""
Chopt
"""
import random
from random import randrange
__author__ = "pliggity"
__version__ = "0.1"
__license__ = "MIT"
chefs = ["Austin", "Amanda", "Darien", "Maryan", "Taylor"]
courses = ["Beverage", "Main Course", "Dessert", "Side", "Appetizer"]
ingredients = ["Lemon", "Lime","Cinnamon","Graham cracker","Corn","Powdered sugar","Potatoes","Ground meat","Beer","Twinkies","Onion","Strawberries","Stick o' butter","Bacon","Mushrooms","Marshmallow",
"Chocolate","Peach","Pizza","Turkey leg","Oreos", "Red Bull","Cheese curds","Corn bread","Hot dog","Panko","Radishes", "Pumpkin","Squash","Caramel apple"]
# opening the file in read mode
tv_shows_file = open("tv_shows.txt", "r")
# reading the file
data = tv_shows_file.read()
# replacing end splitting the text
# when newline ('\n') is seen.
data_into_list = data.split("\n")
tv_shows = list(set(data_into_list))
tv_shows_file.close()
def chopt_assign_ingredient():
random.seed()
for chef in chefs:
c = randrange(len(courses))
i = randrange(len(ingredients))
print(chef, " - ", courses[c], " - ", ingredients[i], "\n")
courses.pop(c)
ingredients.pop(i)
def chopt_assign_tv_show():
random.seed()
for chef in chefs:
c = randrange(len(courses))
i = randrange(len(tv_shows))
print(chef, " - ", courses[c], " - ", tv_shows[i], "\n")
courses.pop(c)
tv_shows.pop(i)
def main():
chopt_assign_tv_show()
#chopt_assign()
if __name__ == "__main__":
""" This is executed when run from the command line """
main()