Question: Python3 Skills Needed to complete this Lab . Use sets .Reading a text file Social Network People have friends and connections on social media sites.

Python3  Python3 Skills Needed to complete this Lab . Use sets .Reading
a text file Social Network People have friends and connections on social

Skills Needed to complete this Lab . Use sets .Reading a text file Social Network People have friends and connections on social media sites. Many times those site show us things for friends of friends who we aren't directly connected to. You are given a text file (friends.txt') that contains rows of people who are connected as friends. Each line has 2 names separated by a space. For instance, line 1, is "Alice Bob" Which means alice is a friend of bob and bob is a friend of alice. The input file may contain different values. You can't assume you will have Alice, Bob, Carol, Edward, Daniel and Fran. You'll want a data structure to track all the friends and each one will have its own data structure for what friends they have. Sample Output Social Network I. Find all friends shared by 2 people D. Find all friends of x, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Enter a valid personAlex Alex is not part of this network, enter another name. Enter a valid personAlice Enter a valid person >Fran Alice and Fran share these people Carol Bob Social Network I. Find all friends shared by 2 people D. Find all friends of X, that person Y does not have S. Find all friends that X and Y have, but do not share with each other Q. Quit Enter a valid person Enter a valid person Alice Fran These people are friends with Alice but not with Fran

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!