This error comes from how you have the for loop set up. Lets say that sentence = "hello how are you doing today". The length of sentence would be 29 and your loop would therefore use the numbers 0...