aCSC-171 Introductory Python Programming DUE:
Project 4 (12 points, +3 bonus available)
Design and code a structured Python program that has a minimum of 4 functions (including a main() function).
Your design MUST meet the following requirements(2 points – due in 1 week):
a. Structure Chart that identifies the functions and how they share information.
Your program MUST meet the following requirements – see rubric for details:
b. Documentation at the top of the program that includes
i. Name
ii. Date
iii. Description of the program’s purpose
c. Input – process – output approach clearly labeled in your program
d. Clear instructions to the user of the program regarding the purpose of the program and if relevant, how to interact with the program.
e. Uses a
list or dictionary
data structure to hold the relevant data (team names and their wins and losses)
f. Uses exception handling to manage FileNotFoundError
g. Neat, output with appropriate formatting (e.g. 67.8% for winning percentage)
MLB Season 2021 Statistics Problem Description
Using the MLBStandings2021.txt file as your source of data, read the contents of the file into a local data structure (list OR dictionary). Your program should provide the following information:
1. Show each team with their Winning percentage
2. For all teams who won 100 or more games, provide a heading and show the Team Name with their number of wins.
3. *BONUS* Provide a heading and show the list of teams who had a winning season (won more games than they lost) with their winning percentage
4. *BONUS* Provide a “menu” allowing the user to interact with the program by selecting the options above for viewing as many/few times as they would like.
Project Grading/Rubric:
Points Grading Criteria
1.5
|
Documentation:
Project Name, Programmer Name, date, Program Description (all described at the top of the file inside comments). Sample output (from running your program) copy/pasted to the bottom of the file enclosed in ‘’’ OUTPUT ‘’’ section
|
2.5
|
Program Structure:
There is a main() function that controls the overall process. There are a minimum of 4 well-defined functions (including main()). The IPO Sections of the Program are clearly and correctly labeled (input, process, output)
|
5
|
Methodology:
The sequential order, Repetition, and Decision structures are efficient and correct; User-friendly instructions and input prompts are provided. Exception handling is provided to manage missing file.
|
1
|
Output Results:
Correct well-formatted output displayed to screen; percentages formatted with 1 decimal digit; clear headings/labels describing output (or menu options)
|
MLB Season 2021 Statistics Project Supports the following Learning Outcomes:
·
Select and implement appropriate data types, expressions and control structures to solve simple, typical programming problems
·
Create, document, and test programming solutions that read and process numeric and string inputs, lists, and files that produce correct results
·
Develop strategies for decomposing complex tasks into reusable functions that exchange and share information via parameter passing and returned values
·
Analyze programming code, trace execution and perform validity testing and debugging
·
Mange exceptions in programs
Understand when to use set and dictionary containers and describe their common operations
Rays,100,62
Yankees,92,70
Red Sox,92,70
Blue Jays,91,71
Orioles,52,110
White Sox,93,69
Indians,80,82
Tigers,77,85
Royals,74,88
Twins,73,89
Astros,95,67
Mariners,90,72
Athletics,86,76
Angels,77,85
Rangers,60,102
Braves,88,73
Phillies,82,80
Mets,77,85
Marlins,67,95
Nationals,65,97
Brewers,95,67
Cardinals,90,72
Reds,83,79
Cubs,71,91
Pirates,61,101
Giants,107,55
Dodgers,106,56
Padres,79,83
Rockies,74,87
Diamondbacks,52,110