Question: Dictionary name_age_pairs contains two key-value pairs. Read a string from input, representing a key found in name_age_pairs. Then, assign the value associated with the key
Dictionary name_age_pairs contains two key-value pairs. Read a string from input, representing a key found in name_age_pairs. Then, assign the value associated with the key read with the current value times 2. name_age_pairs = {'Ben': 54, 'Jan': 73} print('Original:') print(name_age_pairs) ''' Your code goes here ''' print('Updated:') print(name_age_pairs)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
