10. Ending Up



When I type in python, it prints pythonpythonay and at the bottom of the page it says-
It looks like new_word contains "pythonpythonay" instead of "ythonpay"!

It should say ythonpay

original = raw_input('Enter a word:')
new_word = word + first + original[1:] + pyg
word = original.lower()
first = word[0]
pyg = 'ay'

if len(original) > 0 and original.isalpha():
    print new_word
    print 'empty'


It is vital that we recognize how important ordering is. Instructions are given that take us through the steps, but this assumes we will continue down the page, not pile code on top of what we started with.

Suggest reset the exercise and start from the beginning, taking care to build downwards, not upwards so the order is correct. Most of the pieces are in your code, now, but the order is all jumbled.


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