1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
n200080 [17]
3 years ago
13

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 jer

sey 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). Hint: Dictionary keys can be stored in a sorted list. (3 pts)
Computers and Technology
1 answer:
Reika [66]3 years ago
5 0

Answer:

  1. jersey_dict = {}
  2. for i in range(5):
  3.    j_num = int(input("Input Jersey's number (0-99): "))
  4.    rating = int(input("Input rating (1 - 9): "))  
  5.    jersey_dict[j_num] = rating  
  6. sorted_key = []
  7. for i in jersey_dict.keys():
  8.    sorted_key.append(i)
  9. sorted_key.sort()
  10. for i in sorted_key:
  11.    print(str(i) + ":" + str(jersey_dict[i]))

Explanation:

Firstly, define an empty dictionary (Line 1).

Next, use a for loop to prompt user to input five Jersey's number and rating and keep the input to the dictionary (Line 3-6). Next, create a list to hold the dictionary keys (Line 8-10). Use build in method, sort to arrange the keys in the list in ascending order (Line 12 ). At last, print the dictionary element by looping over the value in the sorted_key list (Line 14-15).

You might be interested in
Universal Containers (UC) has decided to build a new, highly sensitive application on the Force platform. The security team at U
Tresset [83]

Use an AppExchange product that does fingerprint scanning with native Salesforce Identity  Confirmation

8 0
3 years ago
You are studying for a test tomorrow. Your friends invite you to
lapo4ka [179]

Answer: C

Explanation:

7 0
3 years ago
Explain the role of ICT in banks​
vladimir1956 [14]

Answer: ICT help banks improve the efficiency and effectiveness of services offered to customers, and enhances business processes, managerial decision making, and workgroup collaborations, which strengthens their competitive positions in rapidly changing and emerging economies.

Explanation: please give branliest I only need one more to make ace

7 0
3 years ago
PL I BEG YOU HELP
Murrr4er [49]

Answer:

Answers in explanation. Try to ask one question at a time, it is easier for people to answer single questions and you will get answers faster.

Explanation:

15. A

16. D

17. B + C

18. A+B+D

19. B+C+D

**20. is NOT Planned personal leave for documentation developers and proof readers. The other 4 answers are correct

21. Presentation notes + Outline

22.B

23.D (im not entirely sure about this one)    

8 0
3 years ago
Whats a good way to remember to log out
Gemiola [76]
You just need to set a reminder on your phone and try and remember

3 0
3 years ago
Other questions:
  • Which principle of design is she following
    9·1 answer
  • When the packet leaves the router, which source and destination ip addresses will be contained in the packet?
    9·1 answer
  • The inventory tracking system shows that 12 laptop were on hand before a customer brings two laptops to the register for purchas
    9·1 answer
  • You want to make it possible for your smartphone to share its internet access wirelessly with your friends device which of the f
    10·1 answer
  • A(n) ____ string contacts the data source and establishes a connection with the database using the Data Source Configuration Wiz
    5·1 answer
  • Does clicking ads and pop ups like the one shown in this image could expose your computer to malware?
    15·1 answer
  • Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates R1 = 500 kbps, R2
    14·1 answer
  • You are developing a system to process lists of days of the week, represented as strings. Create a function is_weekend that cons
    12·1 answer
  • From Blown to Bits why is it important to know what children are doing on the Web Tonight?
    7·1 answer
  • What is causing the electricity prices to increase in South Africa?​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!