The programmer will design a simple point table lookup and update application. The table contains some basic information: team_name, match_played, win, draw, loss, point and rank. Design Solution: 1. English Premier League is a prestigious soccer league. Here is the result of its one session. Man. City|38|32|2|4|98|1 Liverpool|38|30|7|1|97|2 Chelsea|38|21|9|8|72|3 Tottenham|38|23|2|13|71|4 Arsenal|38|21|7|10|70|5 2. Hypothetically, you have been assigned to design a simple lookup software for prestigious ‘English Premier League’ from a given point table. The point table contains team_name, match_played,win, draw, loss, points and rank. 3. The input file, ‘previous_result.txt’ has been provided to you above the top 5 teams in 2018-19 session. Your software needs to be able to search and update the point table based on user input. For example: The first time Chelsea played 38, the second time it changed (based on user input) to 40 and so on. 4. Your program reads information from the file and store them in a dictionary called teams_dict. The dictionary key will be team_name and value will be a list of match_played, win, draw, loss, point and rank. For example: Liverpool will have key of ‘Liverpool’ and value is [38, 30, 7, 1, 97, 2] in teams_dict. 5. Your application will allow for simple search and update current team information. All search/update (see main menu) will be performed on this dictionary. 6. Main menu: User has 2 different choices to perform certain task on team information. A sample menu will look like as follows: 1. Search 2. Update a) Search: Search is performed by team name. User enters team name and the program will return the value by key ID from the dictionary. Sample as follows: Enter your choice (1-4): 1 Enter team name: Man. City M:38, W:32, D:2, L:4, P:98, R:1 b. Update: Update can be performed on a value list: match_played, win, draw, loss, points and rank can be updated for a team. Enter your choice (1-4): 2 Enter team name to update: Chelsea Enter updates separate by "/" (match_played/ win/ draw/ loss/ points/ rank): 40/21/9/8/72/3 Team Information Updated
Python
The programmer will design a simple point table lookup and update application. The table contains some basic information: team_name, match_played, win, draw, loss, point and rank.
Design Solution:
1. English Premier League is a prestigious soccer league. Here is the result of its one session.
Man. City|38|32|2|4|98|1
Liverpool|38|30|7|1|97|2
Chelsea|38|21|9|8|72|3
Tottenham|38|23|2|13|71|4
Arsenal|38|21|7|10|70|5
2. Hypothetically, you have been assigned to design a simple lookup software for prestigious ‘English Premier League’ from a given point table. The point table contains team_name, match_played,win, draw, loss, points and rank.
3. The input file, ‘previous_result.txt’ has been provided to you above the top 5 teams in 2018-19 session. Your software needs to be able to search and update the point table based on user input. For example: The first time Chelsea played 38, the second time it changed (based on user input) to 40 and so on.
4. Your program reads information from the file and store them in a dictionary called teams_dict. The dictionary key will be team_name and value will be a list of match_played, win, draw, loss, point and rank. For example: Liverpool will have key of ‘Liverpool’ and value is [38, 30, 7, 1, 97, 2] in teams_dict.
5. Your application will allow for simple search and update current team information. All
search/update (see main menu) will be performed on this dictionary.
6. Main menu: User has 2 different choices to perform certain task on team information. A sample menu will look like as follows:
1. Search
2. Update
a) Search: Search is performed by team name. User enters team name and the program will
return the value by key ID from the dictionary. Sample as follows:
Enter your choice (1-4): 1
Enter team name: Man. City
M:38, W:32, D:2, L:4, P:98, R:1
b. Update: Update can be performed on a value list: match_played, win, draw, loss, points and rank can be updated for a team.
Enter your choice (1-4): 2
Enter team name to update: Chelsea
Enter updates separate by "/" (match_played/ win/ draw/ loss/ points/ rank):
40/21/9/8/72/3
Team Information Updated
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images