Skip to content

Commit 04c36a7

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 0765566 according to the output from Autopep8. Details: None
1 parent 0765566 commit 04c36a7

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Zoombinis/Zoombinis.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
ZOOMBINIS_PER_TEAM = 8
66

77
# Functions
8+
9+
810
def 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+
1720
def display_teams(teams):
1821
for i, team in enumerate(teams, start=1):
1922
print(f"Team {i}: {team}")
2023

24+
2125
def 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+
4853
if __name__ == "__main__":
4954
main()

0 commit comments

Comments
 (0)