10/19 For Your Hobbies: the Codecademy's bug?


#1

Hello!
Here's my code for the 10/19 "For your hobbies" task - it works, but i can't move to the next exercise because of the error message "Oops, try again. Prompt the user for input using raw_input()". What's the problem?


hobbies = []
for i in range (3):
    hobby = raw_input ("What's your hobby?")
    hobbies.append (hobby)
print hobbies

I rewrote this code like this and I got the same error message.

hobbies = []
for i in range (3):
    hobbies.append (raw_input ("What's your hobby?"))
print hobbies


#2

pfff... codecademy can be annoying sometimes

You can't have a space between raw_input and ("What


#3

Removed a space and it worked! Thank you! :slight_smile:


#4

#5

if you see a u before the string and you want to get rid of it cast the input to a string:

hobbies.append(str(raw_input("What's your hobby?")))