I am getting this error! I cant seem to resolve it!


#1



Stuck at pyglatin-Move it on back!


i followed all the instructions properly yet the code is displaying an error "Oops, try again. Oops! Did you accidentally delete the word variable?". I checked all the forums and the solutions given for this exercise and my code is supposedly correct!


 

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
    print original
else:
    print 'empty'


#2

your code works fine, try refreshing page/different browser


#3

word is not any defined variable, since user storing his value to original then how word=original.lower will work

try below code, running successfully

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
original = original.lower()
first=original[0]
print (original)
else:
print 'empty'


#4

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