Question: Type the program's output # New means new compared to previous level provincial_capitals = { 'Alberta': 'Edmonton', 'Ontario': 'Toronto', 'BC': 'Victoria', 'Manitoba': 'Winnipeg' } province_name

Type the program's output

# "New" means new compared to previous level provincial_capitals = { 'Alberta': 'Edmonton', 'Ontario': 'Toronto', 'BC': 'Victoria', 'Manitoba': 'Winnipeg' }

province_name = input() while province_name != 'exit': if province_name in provincial_capitals: print(provincial_capitals[province_name]) del provincial_capitals[province_name] # New line else: print('x') province_name = input()

input

BC

Alabama

BC

Alberta

exit

Type the program's output # "New" means new compared to previous level

CHALLENGE ACTIVITY 8.12.2: Enter the output of dictionaries. Jump to level 1 Type the program's output # "New" means new compared to previous level provincial_capitals = { 'Alberta': 'Edmonton', "Ontario': 'Toronto', "BC': 'Victoria', "Manitoba': 'Winnipeg } Input BC Alabama BC Alberta exit province_name = input() while province_name != 'exit': if province_name in provincial_capitals: print (provincial_capitals (province_name]) del provincial_capitals (province_name] # New line else: print('x') province_name = input () Output 4 Check Next Feedback

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 Databases Questions!