Skip to main content

Write a python program to check upper and lower case letters in a string.


str1=input("Enter the string")
print(str1)
uprcase=0
lwrcase=0
i=0
while(i<len(str1)):
    if(str1[i].islower()==True):
        lwrcase+=1
    if(str1[i].isupper()==True):
        uprcase+=1
    i+=1
print("No of upper case letters in the string=",uprcase)
print("No of lower case letters in the string=",lwrcase)


Comments

Popular posts from this blog