Just started coding two weeks ago so forgive me for my messy code. Every time that I run this code it says:
Oops, try again. Your code did not run to end - see the console window for the error message.
So I re-read and followed the instructions, which are the following:
First we create a variable s and give it the string "Charlie"
Next we access the first letter of "Charlie" using s. Remember letter positions start at 0.
Then we access a slice of "Charlie" using s[1:4]. This returns everything from the letter at position 1 up till position 4.
We are going to slice the string just like in the 3rd example above.
So now, I'm just confused. I'm not sure if I'm slicing the code right or where I'm supposed to put the code. It may not be in order or anything. I appreciate any and all help!
pyg = 'ay'
word = "original"
word = word.lower()
first = word 
new_word = word + first + pyg
s = "Charlie"
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
Replace this line with your code.