Pyglatin Helo to elohay


#1



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


Oops, try again. It looks like new_word contains "hellohay" instead of "ellohay"!


In the user input i type hello and its suppose to print ellohay but I'm stuck and can figure out why it keeps printing hellohay. thanks for the help


pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    word = original.lower()
else:
    print 'Empty'
    
first = word[0] 
new_word = word + first + pyg
new_word [1:]
print new_word


#2

If you read instructions carefully then you will find ,That it says to put all these lines of code inside the if statements

also..you need to fix this line..

new_word [1:]
You have to assign to itself then print it?


#3

Thanks for your help makes sense now


#4

Just saw,I think you added v in vpyg while posting the code? (Ctrl +v ?)
I hope it helps to purify your code.


#5

Thanks I guess I did that when I went to pa ste it thanks.


#6

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