1 room_data = {} 2 3 input_line = input() 4 while input_line != 'exit': 5 7 8 9 room_number, guest = input_line.split() room_data[int (room_number)] = guest input_line=input() Your code goes here 10 11 print (sorted_values)

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 12VE
icon
Related questions
Question

Multiple key-value pairs, each representing a hotel room number and the guest's name, are read from input and added to room_data. Assign sorted_values with a sorted list of the values in room_data.

1 room_data = {}
2
3 input_line = input()
4 while input_line != 'exit':
5
7
8
9
room_number, guest = input_line.split()
room_data[int (room_number)] = guest
input_line=input()
Your code goes here
10
11 print (sorted_values)
Transcribed Image Text:1 room_data = {} 2 3 input_line = input() 4 while input_line != 'exit': 5 7 8 9 room_number, guest = input_line.split() room_data[int (room_number)] = guest input_line=input() Your code goes here 10 11 print (sorted_values)
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning