Challenge: Calculate the Number of Uppercase and Lowercase Letters

Write a function that accepts a string and returns the number of uppercase and lowercase letters in it.

Write a program that defines a function count_lower_upper() that accepts a string and calculates the number of uppercase and lowercase letters in it. It should return these values as a dictionary:

  • Input: A string s.
  • Output: A dictionary containing the number of uppercase and lowercase letters.

Get hands-on with 1400+ tech skills courses.