Ending Up


#1



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


Oops, try again. word should contain the .lower()-case version of original.


what am I missing?


pyg = 'ay'

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

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


#2

Your own work, following the instructions. We have seen this exact code at least three times in the past week. Are you sure it is not copied from somewhere?


#3

yes it is ive tried to set new_word= word[1:len(original)] + first+ pyg and I would still get an error

I've also tried new_word= word[1:len(original)] + pyg


#4
  1. set pyg
  2. get user input
  3. validate user input
  4. ...set word
  5. ...set first
  6. ...set new_word
  7. ...set slice
  8. ...print new_word

else:
    print "empty"

#5

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