Skip to content
Permalink
Browse files
Forgot to add ID number and such
  • Loading branch information
cradockt committed Nov 28, 2020
1 parent c25e9d9 commit a697c864b44c6609a7c4ee7d36da687ffbaee4d5
Showing 1 changed file with 8 additions and 4 deletions.
@@ -1,4 +1,4 @@
#to allow the user to input an artist and genre, then reccomend other artists from that genre
#Code by Thomas Cradock 10370302

def artistPref():
rockArtists = [
@@ -83,10 +83,11 @@ def artistPref():
"kaiser chiefs"
]


#lists for each music genre containing artists of that genre

pref = input ("Please enter an artist you like to listen to\n").lower()
genre = input("Please enter the genre of the artist you provided\n").lower()
#takes the user inputs for an artist they like and the genre of the artist so it can focus on what genre to look at

if genre == "rock":
print("I would reccommend:\n")
@@ -95,7 +96,10 @@ def artistPref():
continue
else:
print(artist)

#if statement checks the input that the user enter for the genre, then outputs the list of artists from that genre.
#for loop iterates through each element in the list to check if its the same as the artist the user entered
#if it was, it is not printed for the user to see
#if it was not, the element is printed

elif genre == "metal":
print("I would reccommend:\n")
@@ -151,7 +155,7 @@ def artistPref():
else:
print("I do not understand that genre, please try again")
artistPref()

#generic else statement for if the user input for the genre does not match one of the specified ones


artistPref()

0 comments on commit a697c86

Please sign in to comment.