For Your A - code gives right answer but still getting error


Replace this line with your code. Do not remove the backticks that are above or below this line.


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

for char in phrase:
if char == "A" or char == "a":
print "X",
print char,


anyone help with this please? Really stuck here. It is saying

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 . . .".

but my output is giving
X b i r d i n t h e h X n d . . .None

so this looks correct.


Did you delete the print statement with the comment saying that you shouldn't delete it?


yes i did - not sure why that made a difference but thanks


Hi :slight_smile:

Just dont touch that print statement they say dont delete.
I had the same problem. You must just add the for loop and conditions without touching that print statement :).

Hope that helps if you still have any problem :slight_smile: feel free to ask me.


In codecademy the syntax is very strict :slight_smile: so just becareful don`t tamper with their code ,if not told to :slight_smile: just to be safe.