Testing, Testing, is This Thing On?


#1

Guys could you help me out?

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():

word = original.lower()
first = word[0]
new_word = word+first+pyg
new_word = new_word[1:len(new_word)]
print original

else:
print 'empty'

This is my code and it works but when I run it, the program isn't changing letters to lower case and the word that I am writing isn't changing at all.


#2

Can you provide a link?


#3

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


#4

Got it ! I should have written "print new_word" instead of "print original". Thanks anyway!


#5

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