-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmlb.py
63 lines (55 loc) · 1.56 KB
/
mlb.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
import random
import sys
def runMLB():
mlbTeams = [
# American League East
"Baltimore Orioles",
"Boston Red Sox",
"New York Yankees",
"Tampa Bay Rays",
"Toronto Blue Jays",
# American League Central
"Chicago White Sox",
"Cleveland Guardians",
"Detroit Tigers",
"Kansas City Royals",
"Minnesota Twins",
# American League West
"Houston Astros",
"Los Angeles Angels",
"Oakland Athletics",
"Seattle Mariners",
"Texas Rangers",
# National League East
"Atlanta Braves",
"Miami Marlins",
"New York Mets",
"Philadelphia Phillies",
"Washington Nationals",
# National League Central
"Chicago Cubs",
"Cincinnati Reds",
"Milwaukee Brewers",
"Pittsburgh Pirates",
"St. Louis Cardinals",
# National League West
"Arizona Diamondbacks",
"Colorado Rockies",
"Los Angeles Dodgers",
"San Diego Padres",
"San Francisco Giants"
]
mlbTeam1, mlbTeam2 = random.sample(mlbTeams, 2)
print("1. " + mlbTeam1)
print("2. " + mlbTeam2)
print()
goBigTeam = input("Do you want to go big? (y/n): ").lower()
print()
if goBigTeam == "y":
teamChoice = random.choice(mlbTeams)
print("Your team: " + teamChoice)
sys.exit()
else:
selection = input("Enter 1 or 2: ")
teamChoice = mlbTeam1 if selection == "1" else mlbTeam2
print("Your team: " + teamChoice)