Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
NBA Stats Application
The Helper Function
Core Functions
Menu Functions
Putting it all together
18. The main() function


Good job! It's time to finish this console application!


The template presents all the code we've written so far, plus three simple functions that we wrote for you: print_header(), print_menu_options(), and create_players().

Your task is to complete the main() function and finish the app:

  1. Initialize the players list (use a create_players() function).
  2. Print the header (use a print_header() function).
  3. Print the menu options (use a print_menu_options() function).
  4. Prompt the user for a menu option:
    > Enter your choice:
  5. Invoke the do_action() function with the given choice.

Stuck? Here's a hint!

Ad. 1: simply write:

players = create_players()

Ad. 4: use an input() function and assgin the result to a user_choice variable.

Ad. 5: invoke the do_action() function with arguments players and user_choice.