0
8.3kviews
Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters
1 Answer
written 2.6 years ago by |
Explanation:-
Code:-
x=input("Enter the string:- ")
def char(x):
u=0
l=0
for i in x:
if i>='a' and i<='z':
l+=1
if i >='A' and i<='Z':
u+=1
print("LowerCase letter in the String",l)
print("UpperCase letter in the String",u)
char(x)
Output:-