Question: code _ to _ name = { ' WY ' : 'Wyoming', ' OK ' : 'Oklahoma', ' MI ' : 'Michigan', ' TX '

code_to_name ={
'WY': 'Wyoming', 'OK': 'Oklahoma', 'MI': 'Michigan', 'TX': 'Texas',
'AL': 'Alabama', 'NH': 'New Hampshire', 'AR': 'Arkansas', 'CA': 'California'
}
source_state = input()
destination_state = input()
start_state_name = code_to_name[source_state]
end_state_name = code_to_name[destination_state]
print(f'{start_state_name} to {end_state_name}')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!