string=input("Enter string:")
count1=0
count2=0
for i in string:
if(i.islower()):
count1=count1+1
elif(i.isupper()):
count2=count2+1
print("The number of lowercase characters is:")
print(count1)
print("The number of uppercase characters is:")
print(count2)
output:
Enter string:this is anil kumar
The number of lowercase characters is:
15
The number of uppercase characters is:
0
count1=0
count2=0
for i in string:
if(i.islower()):
count1=count1+1
elif(i.isupper()):
count2=count2+1
print("The number of lowercase characters is:")
print(count1)
print("The number of uppercase characters is:")
print(count2)
output:
Enter string:this is anil kumar
The number of lowercase characters is:
15
The number of uppercase characters is:
0