For your hobbies exercise 10, Weird bug in the system?


#1

I have the following code solution (which should work);

hobbies = []

# Add your code below!
for i in range (3):
    hobbies.append (str(raw_input ("prompt: " )))

When running it I get the following in the console;

prompt: a
prompt: s
prompt: d
None
which loooks ok.

But when the program terminates I get;

Oops, try again. Prompt the user for input using raw_input() .

Which I don't really understand... Am I really doing something wrong in this very simple function? Or is it simply some feature of the test system ?

Ps. When printing the appended hobbies string i get, as expected a nice printout with 'a', 's', 'd' as elements in a list (as expected). The 'prompt the user' still remains and I cant get past the test... What gives?


#2

it seems you really need to do this in two steps:
1. prompting the user and storing in a variable
2. append to list

okay, never mind, try removing the space between raw_input and (


#3

Ok. Seems like a pattern matching problem in the test :slight_smile:


#4

2 posts were split to a new topic: 10. for your hobbies


#6