9. Move it on Back


#1



https://www.codecademy.com/en/courses/python-beginner-2W5v7/1/3?curriculum_id=4f89dab3d788890003000096#


It says Oops, try again. It looks like new_word equals "word first pyg" instead of "kkay"!


Why does this not work? I followed the instructions.


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

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


#2

here:

new_word = "word " + "first " + "pyg"

why do you use string? why not the variables of the first three lines?


#3

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