In python btw --------------------------------------- Sample game TeamA TeamB Frank Ingrid Carol Frank Bob Ingrid sample roster Team
Fantastic news! We've Found the answer you've been seeking!
Question:
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
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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 ... View the full answer
Related Book For
Posted Date:
Students also viewed these electrical engineering questions
-
In a study done in the state of Wyoming to detect the presence of CWD, a serious disease in deer, the Wyoming Game and Fish Department selected a random sample of 4300 mule deer from a total...
-
In recent years the average time it takes audit teams from Trimble and Martin to complete a company audit has been 55.8 hours. In monitoring the performance of one of these audit teams recently,...
-
In Section 3.2, we analyzed the heights of the starting five players on each of two men's college basketball teams. The heights, in inches, of the players on Team II are 67, 72, 76, 76, and 84....
-
______________ is an approach to doing business that attempts to maximize an organization's competitiveness through the continual improvement of the quality of its products, services, people,...
-
1. Can the court disregard the LLC entity in this situation? 2. Does fairness demand that Flahive be personally responsible for the LLCs negligence?
-
Consider a gasoline engine for a car as an SSSF device where air and fuel enters at the surrounding conditions 25oC, 100 kPa and leaves the engine exhaust manifold at 1000 K, 100 kPa as products...
-
Refer to the information in Exercise 17-1. Assume that the following information is available for the companys two products for the first quarter of 2017. Required Compute activity rates for each...
-
Comparison of projects, no income taxes (CMA, adapted) New Bio Corporation is a rapidly growing biotech company that has a required rate of return of 10%. It plans to build a new facility in Santa...
-
Put the argument from the following passage into standard form and construct an argument map diagram. There is no need to include unstated premises (assumptions) in your answer. Australia should not...
-
1. Liam Richardson is the business manager for the Smith & Lyngate Insurance agencies in the state of Maryland. Liam is interested in increasing the number of agents in Baltimore and plans to buy...
-
Company #2 has been buying up shares in Company #1, and now holds 50% of Company #1's shares. Most of the shares have been sold to Company #2 by investors who are dissatisfied with the way in which...
-
research further and consider whether this is something you need to document in a series of observations first and discuss (if so, who with) 5. Following on from Q4, you notice that Hanna has become...
-
The most recent financial statements for Cardinal, Inc., are shown here: Income Statement Balance Sheet Sales $ 31,400 Assets $ 74,000 Debt $ 37,400 Costs 18,450 Equity 36,600 Taxable income $ 12,950...
-
DCI currently uses a warehouse management system (WMS) and a transportationmanagement system (TMS) in its distribution center in Mississauga. With distributionout of only one location, the WMS and...
-
subject -----SITXHRM003 Lead and manage people You are the manager of a large new venue. You have employed full staff and one of the policies is to encourage the staff to meet goals and KPI's and...
-
Mr Dinakahinga,a resident citizen, head of family, died on January 15, 2020, leaving the following properties and obligations: Cash in bank, 50%, donated mortis causa 300,000 to Nat'l Govt, 50% to QC...
-
Evaluate both projects with NPV and IRR, and determine what to do. You are faced with two projects and have the opportunity to invest in either one or both of them. The cash flows are as follows....
-
With your classmates, form small teams of skunkworks. Your task is to identify an innovation that you think would benefit your school, college, or university, and to outline an action plan for...
-
Fred Saros is auditing cash payments for OGA, a large supermarket. OGA deals with several very large corporate suppliers who expect payment by electronic funds transfer within three business days of...
-
Fellowes and Associates Chartered Accountants is a successful mid-tier accounting firm with a large range of clients across Canada. In 2011, Fellowes and Associates gained a new client, Health Care...
-
TTT Ltd. has had strong growth over the past three years. The company is involved in mining in northern Canada. While revenues have been increasing, the costs of mining at its remote locations have...
-
Obtain a copy of the ACAS Code of Practice 1: Disciplinary and Grievance Procedures (2009). Use this, and our suggestions in this chapter, to rewrite or modify either of the procedures you used for...
-
One of the disadvantages of the IEEET1 exciter is following a fault the terminal voltage does not necessarily return to its prefault value. Using PowerWorld Simulator case Problem 12_3 determine the...
-
Rework Example 13.6 if the source impedance at the sending end of line \(\mathrm{A}\) is \(\mathrm{Z}_{\mathrm{G}}=\mathrm{Z}_{\mathrm{A}} / 4=100 \Omega\), and the receiving end of line...
Study smarter with the SolutionInn App