Ending Up


#1

could any one help me to solve this program?


#2

take a look at the instructions how to do list slicing, here is some general syntax:

stringVariable[startIndex:stopIndex]

#3

This instructions to say use [1:len(new_word)] However, I don't see this anywhere in your code.


#4

I had written my code as per instructions. Could any one help me to solve this program where my program went wrong?


#5

[1:len(new_word)], you take a slice, but of what? there is no variable/string/list in front of the square brackets

so python doesn't what it should take a slice off


#6

I have been having the same problem too! None of these replies make any sense because actually, [1:len(new_word)] IS in the code, and it is defined by the variable new_word! Any help would be appreciated!


#7

before the square brackets, see how i specify the string/variable of which i want to take a slice? How else is python is going to know what to take a slice of?


#8

could any one help me to solve this program. I was sucked hear. I didn't understand where i went wrong?


#9

It would seem that you need new_word = new_word[1:len(new_word)] instead of nwe_word = word[1:len(new_word)]. Also you should print what new_word is equal to now instead of original because you want to console.log the new word that has been created not the original imputed one.


#10

new_word = word[1:len(new_word)]

this was he code i have written. could you send me correct code please?


#11

Please notice the difference I pointed out earlier that you apparently missed.


#13

4 posts were split to a new topic: Ending up


#18