Oct-09-2021, 11:49 AM
(This post was last modified: Oct-09-2021, 11:49 AM by chickenseizuresalad.)
Hi,I have a homework question: Write a program that will ask for a favorite genre (type) of music, and then make a recommendation.
I have attempted it below but i don't know what went wrong.
I have attempted it below but i don't know what went wrong.
pop=int(input("Do you like pop music?")) alternative=int(input("Do you like alternative music?")) indie=int(input("Do you like indie rock music?")) soul=int(input("Do you like soul music?")) if pop==yes: print("Nirvana") elif alternative==yes: print("Cults") if indie==yes: print("Arctic Monkeys") elif soul==yes: print("The Jackson 5")came out with this:
Error:Traceback (most recent call last):
File "main.py", line 1, in <module>
pop=int(input("Do you like pop music?"))
ValueError: invalid literal for int() with base 10: 'yes'