Help on pyglatin 10 "ending up"


#1

pyg = 'ay'

original = raw_input('Enter a word:')

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

please tell me what is worng i been trying to find out it and can move on with pyglatin


#3

Move the else: to the bottom, and indent the other four lines to match up with print original.

Your code is close to the instructions. If it still does not work, review the instructions and check against your code. If still stuck, post what you have in a new reply and we can look at it some more.


#4

i dont get what you mean


#5

Set new_word equal to the slice from the 1st index all the way to the end of new_word. Use [1:len(new_word)] to do this.


#6

Just assign a new value for new_word which is now going to be new_word[1:len(new_word)]. Then print new_word.


#7

that is the instructions i dont get


#8

In an earlier instruction we are asked to asign, word, first and pyg concatenated (as a single string) to new_word. This instruction asks us to re-assign a slice (a copy of part of the string) to the same variable. This slice will include all the letters in the new string except the very first one.


#9

sooooooooooooooooooo confused!
got this so far!
pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
s = 'hello'
new_word = 'hello'
s[0]
s[1:len(new_word)]

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

what do I do now?


#10

Let's start by removing those lines.

This line will read,

new_word = new_word[1:len(new_word)]

Those two fixes should set you on the right track.


#11

pyg = 'ay'

original = raw_input('Enter a word:')

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

what' wrong in this program


#12

Please refer to the previous post for solution.


#13

A post was split to a new topic: I don't really get what the instructions mean


#15

all u gotta do is, in the last line write ; print new_word[1:len(new_word)]
instead you have have put; print [1:len(new_word)]

how is the console gonna know which word u want to slice ??


#17

It works. Thank you very much!


#19

A post was split to a new topic: 10. ending up


#20