Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python btw --------------------------------------- Sample game TeamA TeamB Frank Ingrid Carol Frank Bob Ingrid sample roster Team NamePlayer NameTeamC AliceTeamB BobTeamB CarolTeamC DaveTeamC EveTeamA FrankTeamB

imageimage

In python btw

---------------------------------------

Sample game

TeamA TeamB Frank Ingrid Carol Frank Bob Ingrid

sample roster

Team NamePlayer NameTeamC AliceTeamB BobTeamB CarolTeamC DaveTeamC EveTeamA FrankTeamB GaryTeamD HelenTeamA IngridTeamB JackTeamD Kate

tt2.pdf UTSC You did such a good job with your previous sececkerping app, the Uruguay Tapir Scratching Competition wants you to build them something even bigger... now with TEAMS! Since tapir scratching has become so popular, UTSC has decided to form a team competition. They have also redesigned their scorekeeping to record the names of the individual who scratched each tapir instead of just the final score. Your application will be used to keep track of teams and games for the competition. Your application must have the following attributes Menu The menu should offer users at least the following options: It-Add roster El T-Display a team roster G- Add a game file Z-End the tournament Q-Quit the application Adding a Roster File The user should be prompted for the name of a roster file. Roster files are CSV formatted files with the first column being the team name and the second column being the player name. An example rester file has been uploaded with this handout. There should be exactly one roster file per tournament (if a user tries to add a roster file to a tournament that already has one, they should receive an error message) For this feature, you will need to produce a dictionary that maps a team name to the list of players on that team. Displaying a Team Roster The user should be prompted for the team name, and then presented with the names of all players on that team. Adding Game Files The user should be prompted for the name of a game file. Game files start with the names of the two teams each on their own line, and then the names of each player who scratched a Tapir. After reading the entire file, your program should print out the scores (Tapirs scratched) for each team, and the winning team (or if the game is a tie, state the names of both teams) You should assume that multiple game files may be added during the tournament. You will need to maintain a dictionary mapping teams to the number of wins (ties count as a win for both teams) Page < 2 of 3 Download o Info - ZOOM + X Close

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

Step: 1

The full source code with comments is as follows Demonstration of error handling by the program 1 The game file includes a team that does not exist in ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing A Practical Approach

Authors: Robyn Moroney

1st Canadian Edition

978-1118472972, 1118472977, 978-1742165943

More Books

Students also viewed these Electrical Engineering questions