PygLatin


#1

original = raw_input(‘Enter a word:’)

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

what i wrote above me is the code, it’s not working


#2

Make sure your code is indented correctly. Python uses white space to recognize structure. If you do not indent your code in an if/else statement, the complier will not recognize it as a conditional. Thus, it will not run your code.


#4

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