Sunday, 23 January 2022

Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters.


SLIP 2 Q 1

CODE :


string=input('enter a string : ')
up=low=ele=0
for x in string:  
    if x.isupper():
        up+=1
    elif x.islower():
        low+=1
    else:
        ele+=1
print('No. of Upper case characters : ',up)
print('No. of Lower case characters : ',low)
print('other special symbols',ele)



OUTPUT :


No comments:

Post a Comment

Write a Java program to display given extension files from a specific directory on server machine.

 DOWNLOAD     SLIP14Q2 /** * STEPS TO RUN CODE * Step 01 compile the code * Step 02 run the code * Step 03 give a file directory locatio...