I just cant


#1



guys please help me I am stuck at ending up


it says Oops, try again. It looks like you printed the correct translation of "dab", but make sure to set new_word equal to the slice as well. ( it writes dab because I entered the word dab


it is actually write forexample if I say goal it becomes oalgay but itstill says that I need to eaqual to the slice
but I dont get what slice it is


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


#2

the exercise wants you to store the slice in a variable before printing it


#3

so what should I do to equal that to the slice


#4

First of all, check the wording of the code. You have an extra space before one of the colons.

Second thing, if I understand correctly, the thing called slice is a result of your if command, so basically what you want to print.

Now, you already created the variable in this exercise – it's called new_word and it's above the if command. Why don't you try creating another variable inside the if command and equal it to the thing you want to print?


#5

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

this is what I have now but it still says the same things


#6

you store the result of the slice in a variable named bro, this variable should be named new_word (in essence, you update a variable)


#7

thank you so much Now I did it


#8