Exercise 1:
Exercise 3:
Exercise 4:
Exercise 5:
Reflection:
-
The location of the last character is not the length of the word, it is the length of the word minus one.
-
The function str.count(sub, begin, end) includes begin but not includes end. If use the location of the last character to be “end”, the last character will not be looked at.