...

/

Challenge: Calculate the Number of Uppercase and Lowercase Letters

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.
Access this course and 1400+ top-rated courses and projects.