My code is right but still showing error message




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

# Add your for loop
for char in phrase:
  if char=='A' or char=='a':
    print "X",
    print char,

#Don't delete this print statement!

where did this print statement go? The comment at the beginning of the lesson explicitly says not to remove it


same code I wrote but still it is showing error as "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 . . .”.”


where is your third print statement then? The one you where told not to remove, without the third print statement you will get that error

after the loop you need a third print statement for validation purpose, its mentioned somewhere


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