What's wrong with my code? Please help! Thanks


pyg = 'ay'
original = raw_input('Enter a word')
word = original.lower()
first = word[0]
new_word = word + pyg
if len(original) > 0 and original.isalpha():
if first = 'a' or first = 'i' or first = '0' or frst = 'u' or first = 'e':
new_word = word[1:] + pyg
print new_word
print "cconsonant"
print 'empty'


So in the previous lesson, "Move it on Back," the instructions said to:

Create a new variable called new_word and set it equal to the concatenation of word, first, and pyg.

That's missing here.

Next, in the current lesson you are in (you never mentioned which lesson you are on or provided a link), the instructions say the following:

Set new_word equal to the slice from the 1st index all the way to the end of new_word. Use [1:len(new_word)] to do this.

I didn't see this done. for your code.


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