PygLatin 11/11


#1

I’m having problems too. Here"s the code. Is anything wrong? 11/11

pyg = ‘ay’

original = raw_input('Enter a word: ')
question = raw_input('Is the word a proper noun?: ')

if len(original) > 0 and original.isalpha():
if question == “yes”:
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word = new_word[1:len(new_word)]
new_letter = new_word[0].upper()
new_word = new_letter + new_word[1:len(new_word)]
print new_word
elif question == “no”:
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word = new_word[1:len(new_word)
print new_word
else:
print ‘invalid’


HELP! My translator isn't working. 11/11
#2

Hi @benfrankson,

What specific problem did you observe?

Your posted code is not formatted, so its indentation is not visible. Indentation is essential in defining the block structure of Python programs. Please see Quick Tips for Writing Good Posts.


#3

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