Ending up


#1

I can't figure out what is wrong with my code.

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
new_word [1:len(new_word)]
else:
print 'empty'

it keeps giving me an error that states "Oops, try again. It looks like new_word contains "chancecay" instead of "hancecay"!"


#2

We no longer need this line so it may be removed.

Assign this back onto new_word. Bear in mind that the index block [] cannot have a space before it.

object[index]

#3

assign new_word [1:len(new_word)] back on to new_word what?


#4
a = a[1:len(a)]

sort of thing.


#6

Thanks this helped me to i was so confused


#7

2 posts were split to a new topic: New_word help


#8