Question: Multiple key - value pairs, each representing a room number and temperature, are read from input and added to room _ temperatures 1 . First,
Multiple keyvalue pairs, each representing a room number and temperature, are read from input and added to roomtemperatures First, merge roomtemperatures with roomtemperatures Then, clear roomtemperatures
Click here for exampleEx: If the input is:
end
then the output is:
Room temperatures : Room temperatures : : : :
roomtemperatures:
refrecord roomtemperatures # For testing purposes, refrecord references roomtemperatures
refrecord roomtemperatures # For testing purposes, refrecord references roomtemperatures
inputline input
while inputline 'end':
room, temperature inputline.split
roomtemperaturesroom temperature
inputline input
roomtemperaturesupdateroomtemperatures
roomtemperaturesclear
printRoom temperatures :
printroomtemperatures
printRoom temperatures :
printroomtemperatures
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
