Stuck again at pyg latin please help


#1

please write the incorrect line correctly


#2

or the missing line please


#3

Copy and paste gone horribly wrong, I'm afraid. Had one been following the instructions and actually writing the code there is no possible way it would look like this, not even by mistake. This is a mash-up.

Admit it. Or not. Either way.


#4

so what to do now please help


#5

The first line is fine, it initializes a global variable. Immediately following you want to get the raw input. That will give you something for original. Once confirmed as word characters with some length we store the first letter. Now we have enough to construct a new string, with word being defined as the lower of original.

new_word = word + first + pyg

The only step remaining is to take a slice of new_word and copy it back into that variable.


#6

but i am not able to do that
can you please write the whole code please


#7

No. You post yours, first, so we can copy and test it. A picture will not do.


#8

any answers??????????


#9

Any code??????????????


#10

ok i will type mine>>>>>>>>


#11

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


#12

it throws the following error


#13

any replies ?????
i have typed my code


#14

please can you reply now i have written my code


#15

EDIT: @mtf is right, your code is really messed up. I recommend resetting all of the PygLatin section, exercise by exercise, then read the instructions and follow them, instead of pasting other people's code.