print(songs2) logoutUser() comparer = Comparer(songs1, songs2) print("########### Songs shared between both profiles ##############") comparer.printCommonSongs() print("########### Similarity Score for the two profiles ##############") print(f"{comparer.similarity*100} %") print("\n") if (comparer.similarity == 1): print(f"The two profiles are identical!") elif (comparer.isSimilar(0.000001)): print( f"The two profiles are very similar, {username1}, you might like these songs from {username2}'s library:" ) wait(5) print("\n") print(comparer.getMissingSongs(0)) print("\n") print( f"{username2}, you might like these songs from {username1}'s library:") print("\n") wait(5) print(comparer.getMissingSongs(1)) else: print("The two profiles are not very similar")
# Create comparision object, object will containo all relevant information about # the similarity of the two profiles comparer = Comparer(songs1, songs2) print("########### Songs shared between both profiles ##############") comparer.printCommonSongs() print("########### Similarity Score for the two profiles ##############") print("{} %".format(comparer.similarity * 100)) print("\n") if (comparer.similarity == 1): print("The two profiles are identical!") elif (comparer.isSimilar(0.5)): print( "The two profiles are very similar, {}, you might like these songs from {}'s library:" .format(username1, username2)) wait(3) print("\n") print(comparer.getMissingSongs(0)) print("\n") print("{}, you might like these songs from {}'s library:".format( username2, username1)) print("\n") wait(3) print(comparer.getMissingSongs(1)) else: print("The two profiles are not very similar")