File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 55ZOOMBINIS_PER_TEAM = 8
66
77# Functions
8+
9+
810def setup_teams ():
911 teams = []
1012 for i in range (2 ):
@@ -14,36 +16,39 @@ def setup_teams():
1416 teams .append (team )
1517 return teams
1618
19+
1720def display_teams (teams ):
1821 for i , team in enumerate (teams , start = 1 ):
1922 print (f"Team { i } : { team } " )
2023
24+
2125def main ():
2226 print ("Welcome to Zoombinis!" )
2327 teams = setup_teams ()
24-
28+
2529 while True :
2630 display_teams (teams )
2731 team_choice = int (input ("Select a team (1 or 2): " ))
28-
32+
2933 if team_choice < 1 or team_choice > 2 :
3034 print ("Invalid team choice. Please select 1 or 2." )
3135 continue
32-
36+
3337 selected_team = teams [team_choice - 1 ]
3438 zoombini_choice = int (input ("Select a Zoombini (1-8): " ))
35-
39+
3640 if zoombini_choice < 1 or zoombini_choice > 8 :
3741 print ("Invalid Zoombini choice. Please select a number between 1 and 8." )
3842 continue
39-
43+
4044 zoombini = selected_team [zoombini_choice - 1 ]
4145 print (f"Selected Zoombini: { zoombini } " )
42-
46+
4347 play_again = input ("Do you want to play again? (y/n): " )
4448 if play_again .lower () != "y" :
4549 print ("Thanks for playing Zoombinis!" )
4650 break
4751
52+
4853if __name__ == "__main__" :
4954 main ()
You can’t perform that action at this time.
0 commit comments