# What is output by the following code fragment? def f2(y, x): # 2, 10 return x/y, y/x # 10/2, 2/10 def f1(y, x): # 10, 2 return f2(x, y) # f2(2, 10) x = 10 y = 2 x, y = f1(x, y) # return 5.0, 0.2 print(x, y) # 5.0, 0.2 # Write code to read emails from # https://storage.googleapis.com/cs1111/practice/emails.txt # (format: friendname,email) # and phone numbers from # https://storage.googleapis.com/cs1111/practice/phones.txt # (format: friendname,phonenumber) # The program then combines emails and phone numbers # and stores them in a contact_dict where # a key is friendname and # a value is a dictionary with 2 keys: email and phone # and the values are their associate values. # For example, # { Michael : {email:Michael@virginia.edu, phone:434-111-1111}, # Stephanie : {email:Stephanie@virginia.edu, phone:434-111-2222}, # ... } # Final step, display contact_dict # (the output should be similar to the following # Michael {'email': 'Michael@virginia.edu', 'phone':'434-111-1111'} # Stephanie {'email': 'Stephanie@virginia.edu'} # ... import urllib.request emailurl = 'https://storage.googleapis.com/cs1111/practice/emails.txt' phoneurl = 'https://storage.googleapis.com/cs1111/practice/phones.txt' contact_dict = {}