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 did you configure the twinkle environment

provide a sample step-wise instructional guide manual, for your latter usage and revision. Also elaborate how did you configure the Twinkle environment

  Anti cyber squatting consumer protection act

What does the Anticybersquatting Consumer Protection Act do. How does this act cut down on nuisance suits

  Create a function to print valid phone book entries

Create a function to print valid phone book entries. Do not display phone book entries that are invalid or NULL (0). You can assume that all people have unique names.

  Design a program which asks for the number of fat grams and

design a program that asks for the number of fat grams and calories in a food item. validate the input as follows- make

  What network protocol enables data to be exchanged

What network protocol enables data to be exchanged between two computers over a secure channel? Which of the following wireless encryption standards uses AES encryption?

  Analyze the critical success factors

The IT department could not remove the old computers because there was no place to store them - Analyze the critical success factors, and state their conclusion and the lessons learned.

  1 express the following numbers in cartesian rectangular

1. express the following numbers in cartesian rectangular form.2. express the following numbers in polar form. describe

  Calculate the rate of heat transfer in steady operation

A spherical vessel, with 30.0-cm outside diameter, is used as a reactor for a slow endothermic reaction. The vessel is completely submerged in a large.

  Should users be divided by site or remain within a single ou

Should users divided by site or remain within a single OU? Why you are making this recommendation. What other recommendations could be implement for these OUs?

  Discuss technological and financial risks in detail

Company M designs manufacture and sells electronic door locks for commercial buildings. The company has approximately 1,500 employees in three locations.

  How you would handle the event for each of the b-tree

Suppose that one page from the database is destroyed. Describe how you would handle this event for each of the B-tree structures described in the text.

  Describe the diagram and the importance of the diagram

Select a diagram from Oracle Architecture and Metrics and then describe the diagram and the importance of the diagram.

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