My NBA position guessing game is a program that analyzes player positions using the averages of statistics from the data set NBA positions 2023-2024. This game allows users to compare statistics of NBA positions. The program works inside of a loop where users choose different categories to view different statistics relating to NBA positions. The statistics being used are points (PTS), total rebounds, meaning offensive and defensive (TRB), assists (AST), steals (STL), and blocks (BLK).
My program uses the average statistics to compare positions. It does this by using the max function. The max function finds the highest value for each category and shows which positions excels in these categories.
My program helps answer question related to the performacnce of different NBA positions in statistical categories. It allows users to compare the average impact of each position depending on what the user is interested in. My program also shows how different roles contribute to team performance. My program offers a way for users to explore NBA statistics.
General Solution: My NBA position guessing game defines key statistics such as (PTS, TRBS, AST, STL, and BLK) for all positions in the NBA. My program allows users to compare them through a menu-driven system. A while loop has the program remaining to run unless the user decides to quit. Input validation ensures only valid choices are accepted as answers. Conditional statements determine the position with the highest value for each category. It uses the max function to find the highest average for that category in my lists. (I learned to use the max function as well as lists already from a friend from home.) The arithmetic operations being used are the addition (+) operator and the comparison (>) operator. The addition is used to calculate the defensive stats and comparison is used to determine the highest value for all statistics on each category.
Expected Output: My program is expected to produce the position and average statistic being asked for depending on which category the user selected. I expect my program to exit the user out if they request to exit.
Average PTS, TRB, AST, STL + BLK should all be examples of possible outputs depending on which category user selected.
If the user enters invalid input the the program will display an error message requesting a possible answer.