creating chatbox song recommender on python (replit) [closed]
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
开发者_StackOverflow中文版Closed 19 mins ago.
Improve this questionhow do i make like a chatbox song recommender on python (replit) like i have a bunch of if elif statements (seen below) just copied and pasted over a bunch of times but to like match the paramter so idk what to do
i have like a really long code that 1. isn't working & 2. way too long basically its this but like copied alot
# chatbox song recommemder
while true:
print("welcome to the chatbox song recommemder")
#emotions = ["happy", "sad", "angry", "calm"]
# day = ["great", "good", "not too bad", "fine", "its been better", "horrible"]
# genres = ["pop", "sad hr", "country", "lofi", "instrumental", "rap", "asian"]
answer = input ("hello how are you feeling:")
# happy:
if answer == happy:
feelings = input("gald your feeling that. how was your day: ")
# happy & great
if feelings == great:
genre = input("great! what genre do you like: ")
if genre == pop:
print ("based on your answers, here is your playlist: ")
elif genre == sadhr:
print ("based on your answers, here is your playlist: ")
elif genre == country:
print ("based on your answers, here is your playlist: ")
elif genre == lofi:
print ("based on your answers, here is your playlist: ")
elif genre == instrumental:
print ("based on your answers, here is your playlist: ")
elif genre == rap:
print ("based on your answers, here is your playlist: ")
else genre == asian:
print ("based on your answers, here is your playlist: ")
You must write:
if answer == "happy"
Don't lose quotes
精彩评论