Strings and Console Output 4. Access by Index


#1

The Instructions state: On line 13, assign the variable fifth_letter equal to the fifth letter of the string "MONTY".
Remember that the fifth letter is not at index 5. Start counting your indices from zero

I've tried:
fifth_letter = "Y"
fifth_letter="MONTY"[4]
fifth_letter="Y"

What am I missing here? Am I supposed to type MONTY out somewhere prior to the fifth_letter statement?

Your help is REALLY appreciated :smile:


#2

This code is completely correct:

fifth_letter="MONTY"[4]

Try to reset the code and submit this answer again :smile:


#3

Yes thank you! I reset it and that worked.


#4

You're very welcome :smile: