Ending up! Please HELP ME! :(


#1

I have no idea what ive done wrong. theres a message that line 14 the 'else' line in invalid.

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = original[0]

if len(original) > 0 and original.isalpha():

new_word = word + first + pyg
new_word[1:len(new_word)]

print original

else:
print "empty"


#2

Since original is already transformed to lowercase and assigned to word, we should use the transformed value:

first = word[0]

This condition should be tested before manipulating the raw_input.

pyg = "ay"
original = raw_input("Enter a word:")
if len(original > 0 and original.isalpha():
    print original
    word = original.lower()
    first = word[0]
    new_word = ...
    new_word = new_word[ ...
    print new_word
else:
    print "empty"

The ... is code you have already.


#3

Thank you I managed to move on! thanks for your help! :slightly_smiling: