In your program, friends.py, we will practice working with sets. Download the file, people.txt, from Canvas. Read in the file and create a dictionary with the names as keys and the set of interests as values. Display the possible names to the user and then allow the user to choose two names to compare their interests. Make use of exception handling to ensure the 2 names (keys) they have chosen are in the dictionary you have created. If one of the names they enter is not in the dictionary, allow them to choose again until both names are valid. If the user enters 'done', end the program. Then give the user following options for comparing the two people: what they have in common, all interests they don't have in common, what interests are individual to each person, and also to back/choose new people. Create three functions, one for each type of comparison. Use set methods or the short cuts, to get the requested information. Print the result of the comparison chosen. I can give the .txt file upon request.
1
Expert's answer
2020-12-13T22:53:37-0500
Dear Lloyd, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment