For your A


#1



https://www.codecademy.com/courses/python-beginner-en-cxMGf/1/4?curriculum_id=4f89dab3d788890003000096#


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

Why is this wrong? Thanks!


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

# Add your for loop
for char in phrase:
    if char == "A" or char == "a":
        print "X",
    else:
        print char,
#Don't delete this print statement!
    print


#2

That print statement should not be indented.


#3

you sir are a saint.

why does indenting that last print cause the characters to print vertically?


#4

Because without a comma after it, print ends each line with a newline character.


#5

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