Implement a menu of options for a user to modify the roster

Assignment Help Computer Engineering
Reference no: EM132113559

IN PYTHON

This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balanced team.

(1) Prompt the user to input five pairs of numbers: A player's jersey number (0 - 99) and the player's rating (1 - 9). Store the jersey numbers and the ratings in a dictionary.

Output the dictionary's elements with the jersey numbers in ascending order (i.e., output the roster from smallest to largest jersey number).

Be careful with this and later parts of the problem to get the blank lines between blocks of interaction to print exactly the way shown in the expected output, since white space counts this time.

Hint: Dictionaries cannot be sorted but dictionary keys can be stored in a sorted list.

Ex: Enter player 1's jersey number: 84 Enter player 1's rating: 7 Enter player 2's jersey number: 23 Enter player 2's rating: 4 Enter player 3's jersey number: 4 Enter player 3's rating: 5 Enter player 4's jersey number: 30 Enter player 4's rating: 2 Enter player 5's jersey number: 66 Enter player 5's rating: 9 ROSTER Jersey number: 4, Rating: 5 Jersey number: 23, Rating: 4 Jersey number 30, Rating: 2 ...

(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing.

Ex: MENU a - Add player d - Remove player u - Update player rating r - Output players above a rating o - Output roster q - Quit Choose an option:

(3) Implement the "Output roster" menu option, printing the players in the order of their jersey numbers, as in part (1) above.

Ex: ROSTER Jersey number: 4, Rating: 5 Jersey number: 23, Rating: 4 Jersey number 30, Rating: 2 ...

(4) Implement the "Add player" menu option. Prompt the user for a new player's jersey number and rating. Append the values to the two vectors.

Ex: Enter a new player's jersey number: 49 Enter the player's rating: 8

(5) Implement the "Delete player" menu option. Prompt the user for a player's jersey number. Remove the player from the roster (delete the jersey number and rating).

Ex: Enter a jersey number: 4

(6) Implement the "Update player rating" menu option. Prompt the user for a player's jersey number. Prompt again for a new rating for the player, and then change that player's rating.

Ex: Enter a jersey number: 23 Enter a new rating for player: 6

(7) Implement the "Output players above a rating" menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value.

Ex: Enter a rating: 5 ABOVE 5 Jersey number: 66, Rating: 9 Jersey number: 84, Rating: 7 ...

Reference no: EM132113559

Questions Cloud

Write a new method in the rectangle class to test : Write a new method in the Rectangle class to test if a Point falls within the rectangle.
Compute the surface area and volume of a sphere : Write a main program that uses these functions to compute the surface area and volume of a sphere given the radius.
Create a loop to go through the array and place each : Create a loop to go through the array and place each element one at a time into a file named outFile.txt.
What is the probability that the sample mean time : What is the probability that the sample mean time between the last drink and the onset of withdrawal will be 37.3 hours or more?
Implement a menu of options for a user to modify the roster : Output the dictionary's elements with the jersey numbers in ascending order (i.e., output the roster from smallest to largest jersey number).
Write a program that creates an object of the production : Write a program that creates an object of the Production.Worker class and prompts the user to enter data for each of the object's data attributes.
What is the maximum water usage that would qualify : What is the maximum water usage that would qualify for the city tax rebate?
Write a gui program that calculates a cars gas mileage : When a Calculate MPG button is clicked, the program should display the number of miles that the car may be driven per gallon of gas.
Write a program that inputs this data file and prints out : Write a program that inputs this data file and prints out the total costs. Don't forget to perform necessary string processing and type conversion.

Reviews

Write a Review

Computer Engineering Questions & Answers

  How to handle the customervalidator''s servervalidate event

Write down a method that handles the CustomerValidator's ServerValidate event. In addition, write a JavaScript function for the CustomValidator's CustomValidationFunction property.

  List some attributes and operations that defined for a class

List some attributes and operations that might be defined for a class called WindowPane that represents a window pane.

  Project on making frameworks

Apply decision making frameworks to IT-related ethical issues

  Write a multi-layer neural network in the language

Principles of Neural Systems and Implementation Project Guidelines - Each project requires the development of a program. This means that some programming skills are essential for completing the project successfully.

  Match a name containing a capital letter followed

Write the following regular expressions. Test them with a script that reads a line from STDIN and prints "yes" if it matches and "no" if not.

  Provide one specific network configuration example

Provide one specific network configuration example for each best practice that demonstrates the application of the best practice.

  Questioncs 136 systems analysis and design -course project

questioncs 136 systems analysis and design -course project -you have to complete and submit course project previous to

  Create a network security vulnerability and threat table

Create a network security vulnerability and threat table in which you outline the security architecture of organization and cryptographic means of protecting.

  Identify the geopolitics of key nations

Create a 1-page, 4-row by 3-column table in Microsoft® Word that depicts laws for the U.S. and two other key nations in the strategic, tactical.

  Find the cost of sorting the relation

Find records with a search-key value of 7. Find the cost of sorting the relation, in seconds, with bb = 100. How many merge passes are required?

  Describe security organization including reporting structure

Discuss the need for management support. Describe the security organization, including reporting structure. Discuss reporting methods that are used to inform management of the program status.

  Describe four advanced boot options

When a driver is verified, a unique digital signature is incorporated into it in a process called and File System can be used to encrypt individual files on a file system.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd