Sale!

COMP 636 Python Assessment Solved

Original price was: $40.00.Current price is: $35.00.

Category:

Description

5/5 - (1 vote)

Instructions

The LU Table Tennis (Ping Pong) Club has asked for a system to help manage the club. You are
provided with an outline of the program to complete. The club has teams of two players (doubles)
which play in matches against each other. The system needs to record teams and the players in each
team, the match draw (the matches that will be played) and the results of each match.
Players’ names are stored as a tuple (‘firstname’,’surname’)
Team names are the surnames of both players joined together.
The draw should be stored as a list of lists, with the format [‘team1’, None, ‘team2’, None] with the
None values replaced by the score when a result is entered.
Team names must be unique.
Each player should be a member of only one team. For this assignment, you can assume all players
have different names.
A function to list Teams and the Players is provided.
Use the provided columnOutput function for all on-screen display of data.
Validate all user input.
50 marks available in total.

Add the following features to the system:

1. Menu enhancements (1 marks): Modify the main menu so that:
The menu can be repeated (without an error message) by pressing ‘R’ (or ‘r’).
2. Player lists (6 marks): List all players, sorted by surname (A to Z) and then firstname (A
to Z), and also list them by firstname (A to Z) and then surname (A to Z).
3. Add Team (10 marks): Add a new team to the system, ensuring that team and player
names are unique. (Each player name must be unique, the surname combination that
makes a team name must also be unique)
4. Add match result (8 marks): Update a match in the system with the score. Matches are
played as a the best of 5 games, so the total of both teams’ scores should not exceed 5.
(A game win scores 1 point, and games are never tied.)
5. Create Draw (10 marks): Calculate the draw of all matches to be played. Each team must
play every other team. The draw should be displayed once it is created.
2
6. Display Winners (10 marks): Add an additional menu item and function to display the
winners for each match. The display must show the teams that played and the team that
won.
In addition:
Overall quality (5 marks): Tidy output presentation, code structure and commenting across all
questions

File Download and Submission Instructions:

Download the following files from Akoraka | Learn on the COMP636 Assessment page:
– lutt_admin_[your_name].py – initial code to begin from.
– lutt_admin_data.py – team and player data. Do not change line 7 (colTeams structure).
You may add extra teams to dbTeams for testing purposes if you like, but that is not
necessary. We will use our own copy of lutt_admin_data when marking, with different
dbTeams player and team data, but with the same colTeams and dbTeams structure as
provided.
Submit (upload) only your main Python (.py) file: lutt_admin_your_name.py
– Include your name in the filename and your name and student ID in a comment at the start
of the file
– Submit your file via the submission link on the COMP636 Assessment page
Mark Allocation:
50 marks available:
Item Marks available
Menu enhancements 1
Player lists 6
Add Team 10
Add match result 8
Create Draw 10
Display winners 10
Overall quality 5
TOTAL 50

Additional notes:

– The quality of the user experience will be taken into account for each assessment item as
well as in the Overall Quality mark in the table above. Full marks for any item will require
validation of data types (if required) and details in the interface that demonstrate some
consideration of what would work well for the user (within the limitations of the terminal
window output in VS Code).
– The provided Python file lutt_admin_[your_name].py contains a menu structure and
partially completed functions, these must not be deleted or renamed, but you may add
3
arguments/parameters to these functions. You may also add additional functions of your
own. Rename the file to include your name.
– The columnOutput() function is available to produce nicely formatted output in columns.
Instructions for use are in the comments for the function. You are required to use it, for all
menu items that output information.
– You must add comments to your code. The existing comments give some hints about the
behaviour expectations of each function.
– Quality includes commenting, appropriate formatting and solutions that are not overly
complex. The interaction with the user and display of information is also considered under
this area.