For Your A (what am i doing wrong?


#1

So every post I've seen says that this code is correct, but it's not working for me. It is telling me that i didn't replace the a's with x's

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

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

help?


#2

Your index is char in your loop. Why aren't you using that? c is undefined. Do you mean to use char instead?


#3

Oh that fixed it! I'm not sure why i used c's


#4

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