You are on page 1of 1

def show(s): #count upper and lower letter fuction

countUpper = 0
countLower = 0
for i in range(0,len(s)):
if s[i].isupper() == True :
countUpper += 1
# return countUpper
elif s[i].islower() == True :
countLower +=1
# return countLower
# else:
print("*--------------------------------------------------------*")
print("Given string: {} ".format(s))
print("Number of uppercase letters: {}".format(countUpper))
print("Number of lowercase letters: {} ".format(countLower))

s = str(input())
show(s)

You might also like