Hi. I have tried to slice the string multiple times using the “print” command, “slice” command, and tried several different variations for numbering the elements to align with the word “Happy” in the string. I cannot seem to figure out where I’m going wrong to not be able to get the final point for the flag. Attached is a screenshot (but, as I’ve said, I have tried to use ‘slice’ instead of ‘print’, and I have tried 10:15:1, 11:15:1, etc.) Any hints would be greatly appreciated!
Remember, string array indexes start at 0 not 1. Also you have to shoot over the last index by 1 because “reasons”.
According to Google AI…
“The slicing syntax is defined as start:stop, where the slice includes all elements from the start index up to, but not including, the stop index [1, 2].“
So you just have to adjust you start index, your stop index is good.
1 Like
