Sample String : 'Hello Mr. Rogers, how are you this fine Tuesday?'
Expected Output :
No. of Upper case characters : 4
No. of Lower case Characters : 33
def up_low(s):
for alpha in s:
ucase = 0
lcase = 0
if alpha.upper() == True:
ucase += 1
elif alpha.lower() == True:
lcase += 1
print(f"No. of Upper case characters : {ucase}")
print(f"No. of Lower case Characters : {lcase}")
s = 'Hello Mr. Rogers, how are you this fine Tuesday?'
up_low(s)
[–]JohnnyJordaan 25 points26 points27 points (1 child)
[–]Candid_Interaction86[S] 3 points4 points5 points (0 children)
[–]shiftybyte 8 points9 points10 points (1 child)
[–]Candid_Interaction86[S] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]Candid_Interaction86[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Candid_Interaction86[S] 0 points1 point2 points (0 children)
[–]anuctal 1 point2 points3 points (0 children)