Ending up what am I doing wrong


#1


pyglatin 10 ending up


python
Replace this line with your code. pyg = 'ay' new_word = word + first + pyg original = raw_input('Enter a word:') if len(original) > 0 and original.isalpha(): print original else: print 'empty' word = original.lower() first = word[0] print original
Ive tried loads but what isn't working it says Oops, try again. It looks like new_word contains "hellohay" instead of "ellohay"!


#2

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word = new_word[1:len(new_word)]
print original
print new_word

else:
print 'empty' #lesson 10 "Ending Up"
#hope it helps


#3

except

new_word = word[1:len(new_word)]

also, I put mine outside of the if statement, if that makes any difference(if did for me).


#4

everything inside "if" statement should be indented up to "else" statement.


#5

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