Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ChatBot-C3/top5songs.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (15 sloc)
708 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def TopPersonalSongs(S): | |
from collections import Counter #imports collections.Counter | |
if S==True: | |
TopPersonalArt("Rihanna") #runs TopPersonalArt function and gets the sorted element of top 5 artists | |
#code for top song based on artists | |
# | |
# | |
def accessToTop5(word): | |
searchedWord=["top10","favorite","top","top5","best"] #list for searched words | |
if str(word) in searchedWord : #ask the user if he wants a top 5 | |
ask=input("Would you like a personalised top 5?(Y/n)") | |
if ask=="n" : | |
quit() | |
else: | |
return TopPersonalSongs("word") #if yes gows to function topPersonalSongs |