Question: For this assignment, define a friendship relation as a link between two persons. For example, the provided text file friends . txt lists all pairs
For this assignment, define a friendship relation as a link between two persons. For example, the provided text filefriendstxt lists all pairs of movie characters who appeared together in a scene of a Star Wars movie We referto any pair of characters who were listed together as friendsWe can then ask queries about this set of friendship relations. For example, who is the most popular character,that is who appeared with the most other characters? Or for some specific character, how many others are within twodegrees of separation that is who are friends of the characters friends?You will answer these questions with Python code, using appropriate data types to read, store and look up the givenfriendship relations.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
