File "python", line 10
SyntaxError: invalid syntax
Try this code instead:
pyg = 'ay' original = raw_input('Enter a word:') if len(original) > 0 and original.isalpha(): word = original.lower() first = word newword = word + first + pyg newword = newword[1:len(newword)] print original else: print 'empty'
Refresh the page and write this code, it must work:
pyg = 'ay' original = rawinput('Enter a word:') word=original.lower() first=word newword=(word+first+pyg) newword=newword[1:len(newword)] if len(original) > 0 and original.isalpha(): print newword else: print 'empty'
It did for me. Thank you!
One more question...
Can we delete the second line of newword?
it seems that we can still run out without it
Or you only had to indent your