コード例 #1
0
def init():
    teams = TEAMS.copy()
    players = clean_data(PLAYERS)
    balanced_teams = balance_teams(teams, players)
    intro_msg()
    while True:
        team_index = get_user_selected_team(balanced_teams)
        display_team_stats(balanced_teams[team_index])
コード例 #2
0
ファイル: app.py プロジェクト: IceHilda/Basketball
                   for item in team_players]  # [42, 40, 45, ...]

    while counter >= 1:
        for team in final_teams:
            tallest_loc = all_heights.index(max(all_heights))  # returns 3
            all_heights.pop(tallest_loc)
            team["players"].append(team_players.pop(tallest_loc))
        counter -= 1
    return final_teams

    # teams: Panthers, Bandits and Warriors.
    # max(height) popped from the list of players and then appended to team that did draft. .pop eliminated it from player pool


if __name__ == "__main__":
    my_team_names = TEAMS.copy()
    my_players = PLAYERS.copy()

    my_team_names, my_players = clean_data(my_team_names, my_players)
    my_teams = balance_teams(my_team_names, my_players)

    print("Basketball Team Statistics Tool\n\n---- Menu ----")

    while True:
        choice1 = input(
            "Please Select From the Following Menus:\n1) Display Team Stats\n2) Quit\nChoice>  "
        )
        if choice1 == "1":
            print(my_teams)
            # TODO display team stats
        elif choice1 == "2":