Assignment 1: Prompt the user for 5 pairs of numbers.  The pairs consist of a player’s jersey number (0-99) and the player’s rating (1-9).  Make sure to use good prompts and check the user’s input using a while loop.  Do not stop the program if the input is outside the range.  You need to prompt the user until they get the numbers correct.  Store the pairs in a dictionary.  Since the player’s jersey number is a key, you need to check for duplicates and prompt user again if the number is already in use.  After all players are entered, print the roster with the jersey numbers in ascending order.  Next, print a menu for the user to be able to modify the roster.  They should be able to add a new player, remove a player, update a player’s rating, output a list of players above a rating (get the cutoff from the user), output the roster, or quit. You need to turn in a written algorithm for this project before starting to write the program.   Assignment 2: Change assignment 1 to use functions. You need to have a function for printing the menu and one function for each of the menu items, at least. You can use other functions if you would like.  I want just the code for this part.  Your algorithm will be included in the final paper.   Essentially, use the first assignment instructions but use functions for what assignment 2 asks.    I can submit my code in another question if need be.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Assignment 1:

Prompt the user for 5 pairs of numbers.  The pairs consist of a player’s jersey number (0-99) and the player’s rating (1-9).  Make sure to use good prompts and check the user’s input using a while loop.  Do not stop the program if the input is outside the range.  You need to prompt the user until they get the numbers correct.  Store the pairs in a dictionary.  Since the player’s jersey number is a key, you need to check for duplicates and prompt user again if the number is already in use.  After all players are entered, print the roster with the jersey numbers in ascending order. 

Next, print a menu for the user to be able to modify the roster.  They should be able to add a new player, remove a player, update a player’s rating, output a list of players above a rating (get the cutoff from the user), output the roster, or quit.

You need to turn in a written algorithm for this project before starting to write the program.

 

Assignment 2:

Change assignment 1 to use functions. You need to have a function for printing the menu and one function for each of the menu items, at least. You can use other functions if you would like.  I want just the code for this part.  Your algorithm will be included in the final paper.

 

Essentially, use the first assignment instructions but use functions for what assignment 2 asks.   

I can submit my code in another question if need be.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 8 images

Blurred answer
Knowledge Booster
Set
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education