Help in coding


#1

Please tell me what i am doing wrong here

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

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

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


#2

did you read how the use of , will keep the print on the same line? (information of the exercise)

i don't see you use ,


#3

stetim after giving the ',' , still giving error

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

"""


#4

you should start using back-ticks (`) instead of quotation marks (") so markup will show

if the character is not a, char will be printed, but not on the same line, because there is no comma at this print statement


#5

`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`

Still i am facing the issue


#6

you should add a comma to both print statement so the print stays on the same line


#7

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,

Still getting error

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


#8

#Don't delete this print statement!
print

you delete this print statement


#9

Thank you so much Stetim.


#10