Is there a way to make this smoother


#1

Not the most elegant. Input appreciated!

def pyg_trans():
    print ('Your word is: %s') % word
    first_letter = word[0]
    first_letter = str.lower(first_letter)

    new_word=word[1:]

    print 'Translating your word to Pyg ...'

    pyg = new_word+first_letter+'ay'
    pyg = str.capitalize(pyg)

    print ('Your word in Pyg is: %s') % pyg

word = raw_input('Gimme a word, any word! ')
pyg_trans()

#2

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