8. Write a program that prompts the user for a string. Call a function passing the string. The function should count and print the number of uppercase letters and lowercase letters in the string code example

Example 1: Count lower case characters in a string

def n_lower_chars(string):
    return sum([int(c.islower()) for c in string])

Example 2: Count upper case characters in a string

def n_upper_chars(string):
    return sum([int(c.isupper()) for c in string])

Example 3: python 3 calculate uppercase lowercase letter

world = input()
upper,lower = 0,0

for i in world:
    upper+=i.isupper()
    lower+=i.islower()

print("UPPER CASE {0}\nLOWER CASE {1}".format(upper,lower))