Not sure what I'm doing wrong


#1


I'm currently stuck with the Ending Up exercise.

I typed in "Hey" and the error message that I've received is "It looks like new_word contains 'dfay' instead of ;eyhay!''"

I'm not quite sure what I did wrong here.

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha()==True:
    if original[0] in 'A,E,I,O,U,a,e,i,o,u':
        new_word=original.lower()+pyg
        print new_word
    else:
        print "consonant"
else:
    print 'empty'
word=original.lower()
first=word[0]
new_word = new_word[1:len(new_word)]


#2

Read the instruction again!


#3

I see. This is how I changed it.

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha()==True:
if original[0] in 'A,E,I,O,U,a,e,i,o,u':
new_word = new_word[1:len(new_word)]
print new_word
else:
print "consonant"
else:
print 'empty'
word=original.lower()
first=word[0]

Now the new error message is "Did you accidentally delete the new_word variable?".


#4

try it to see if it works


#5

I figured out what I did wrong. Thanks guys!


#6

does any body know how to actually make a web site


#7

Start here(After you finish Codecademy course or you can do both things at same time)...


#8

thank you so much i just hope i figure it out


#10

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