10/19 For Your Hobbies


#1
hobbies = []
# Add your code below!
hey = str(raw_input("What's your hobby, matey??"))
for hobby in range(4):
    hobbies.append(hobby)
print hobby

When I run the code, it checks out. However, it doesn't ask the question again three times as I expected and prints out a 3 for some reason.

What's your hobby, matey?? Fighting
3
None

What's up?


#2

i would place raw_input inside the loop so that you get prompted multiply times

Then print hobbies after the loop


#3

Thanks! That worked! Could you explain why it changed after?


#4

that is good to hear :slight_smile:

sorry, what changed after what?


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.