Phyton Programming Strings section 4 Help?


#1

I have this code, I thought I was doing it right... Obviously not. Can anyone please tell me what I am doing wrong?
"""
The string "PYTHON" has six characters,
numbered 0 to 5, as shown below:

+---+---+---+---+---+---+
| P | Y | T | H | O | N |
+---+---+---+---+---+---+
0 1 2 3 4 5

So if you wanted "Y", you could just type
"PYTHON"[1] (always start counting from 0!)
"""
fifth_letter = "MONTY[4]"

print fifth_letter


#2

Hi you should put the fifth_letter like that "MONTY"[4]


#3

@wizmarco thank you :slightly_smiling: that makes sense :smiley:
thanks


#4

i do it many times but its still error

fifth_letter = "MONTY"[4]


#5

fifth_letter = "MONTY[4]"

print fifth_letter

copy and paste it it worked for me easy i just could not understand one sentence and had to look for solution :smiley:


#6

thanks ive been stuck with this


#7

I had to do this|
v

"""MONTY[4]"""
fifth_letter = "Y"

print fifth_letter


#8

Hmm....Does fifth_letter = "MONTY"[4] not work for you?