Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 986 Bytes

File metadata and controls

16 lines (12 loc) · 986 Bytes

Friend Network Analyzer - Python

This program reads user data from a file, processes it to create a network of friendships, and gives various statistics and recommendations about the network.

Key functions:

  • getNumbersOfFriends: Returns a list of friend counts for each user.
  • networkBinarySearch: Finds a user's index using binary search.
  • create_network: Reads user data from a file to create a friendship network.
  • getCommonFriends: Identifies common friends between two users.
  • recommend: Recommends a new friend for a user based on common friends.
  • k_or_more_friends, maximum_num_friends, people_with_most_friends, average_num_friends, knows_everyone: Provides various statistics about the network.
  • is_valid_file_name, get_file_name, get_uid: Handle file input and user input validation.
  • Main script: Reads the network from a file, displays statistics, recommends friends, and identifies common friends for given user pairs.

Brooke MacQuarrie - bmacq014@uottawa.ca