Exercise: Likability in a Small Town

Apply what you have learned about creating graphs in Python.

A network that represents a social community

In a small community, there is a group of friends who regularly interact with each other. They want to find out who has the strongest affinity/likability among the members. To represent this social network, we create a graph where each node represents a person, and the weight of the edge between two nodes represents the level of affinity between those two people. The higher the weight, the stronger the affinity, with 10 meaning they like each other a lot and 0 meaning they don't like each other at all.

Get hands-on with 1300+ tech skills courses.