Computers and Technology

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. also, any output in later parts of the problem must also be sorted with the jersey numbers in ascending order. hint: dictionaries cannot be sorted but dictionary keys can be stored in a sorted list. (3 pts)

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 the option prompt, and then outputs the menu and the option prompt each time the user chooses an option and its execution finishes, i. e. the user provides the option's input, if any, and the program prints the option's output, if any. the program ends when the user chooses the option to quit. for this step, the other options do nothing. (2 pts)

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. (1 pt)

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. (1 pt)

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). (1 pt)

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. (1 pt)

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, again in ascending order of jersey number.. (2 pts)

ex:

enter a rating:
5
above 5
jersey number: 66, rating: 9
jersey number: 84, rating: 7

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:30, Samsonb
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year. ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
image
Computers and Technology, 22.06.2019 19:30, keke6361
When using a public computer or network, you should always
Answers: 2
image
Computers and Technology, 23.06.2019 09:30, Princessirisperez0
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e. g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
image
Computers and Technology, 23.06.2019 13:30, alannaamarriee
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
Do you know the correct answer?
This program will store roster and rating information for a soccer team. coaches rate players during...

Questions in other subjects: