+ 1

write a program in python to find number of uppercase and lowercase letter in a string.

Please answer this question..

9th Apr 2020, 10:25 AM
guru randhawa
guru randhawa - avatar
6 Answers
+ 1
a=input("entet string:") c1=0 c2=0 for i in a: if i.isupper(): c1+=1 elif i.islower(): c2+=1 print("uppercase:",c1) print("lowercase",c2)
9th Apr 2020, 3:12 PM
Ashish Singh
Ashish Singh - avatar
+ 3
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) #my attempt
9th Apr 2020, 10:48 AM
guru randhawa
guru randhawa - avatar
+ 3
guru randhawa Well done
9th Apr 2020, 11:53 AM
A͢J
A͢J - avatar
+ 2
Try first and show your attempts if getting problem.
9th Apr 2020, 10:27 AM
A͢J
A͢J - avatar
0
var = "PyThon" lower = 0 upper = 0 for i in var: if i.islower(): lower+=1 elif i.isupper(): upper+=1 print("uppercase : ",upper) Print(" lowercase : ",lower)
9th Apr 2020, 10:32 AM
Rishi
Rishi - avatar
0
Ty 🤗❤️
9th Apr 2020, 2:38 PM
guru randhawa
guru randhawa - avatar