Have taken into account the comments yet get an erro


#1

Can i please get help with this following code of mine i have taken into account the comments yet get an error

phrase = "A bird in the hand..."

Add your for loop

for char in phrase:
if char in 'Aa':
print 'X',
else:

Don't delete this print statement!

     print char,

the error is

Oops, try again.
Did you replace all of the "A"s and "a"s with "X"s? It looks like
you printed "" instead of "X b i r d i n t h e h X n d . . .".


For your A
#2

Your code works for me ;

phrase = "A bird in the hand..."
for char in phrase:
    if char in 'Aa':
        print 'X',
    else:
        print char,

you can see her


#3

I got the same results, however the console prints out exactly the correct answer. The comment is that: it looks like you printed "". This is not true.
By the way: i put an elif statement to filter out the spaces between the words.
elif char == "":
continue

Anyway I doe not get the "green" "start your next lesson"


#4

@mattvangerwen: That's odd.
Well, this exercise can cause some problems due to the way they expect you to print the message.
One extra blank space between letters will cause the program to consider it to be wrong because that's not what it was expected.

If you're still getting the error, post it so we can take a look.