Write the function count_upper
that take a string and two integers lo
and hi
, and returns the number of uppercase letters from position lo
to position hi
inclusive.
count_upper('we all aGrEEd; it Was a magNifiCeNT Evening.', 2, 20) -> 4
count_upper('we all aGrEEd; it Was a magNifiCeNT Evening.', 2, 50) -> 9