CHALLENGE ACTIVITY 8.12.2: Enter the output of dictionaries. 375510.2350218.qx3zqy7 Jump to level 1 1 Type the program's
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
CHALLENGE ACTIVITY 8.12.2: Enter the output of dictionaries. 375510.2350218.qx3zqy7 Jump to level 1 1 Type the program's
CHALLENGE ACTIVITY 8.12.2: Enter the output of dictionaries. 375510.2350218.qx3zqy7 Jump to level 1 1 Type the program's output # "New" means new compared to previous level provincial_capitals = { 'Yukon": 'Whitehorse', 'Nunavut': 'Iqaluit', Manitoba': 'Winnipeg', 'BC': 'Victoria' } Input Manitoba Nunavut Texas Nunavut 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? How was this section? 10 9 Provide feedback
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!