Computer Science, asked by madityasaxena, 1 month ago

write a program to input a string and print number of upper and lower case letters in it

Answers

Answered by panchalprachi749
1

Explanation:

Scan string str from 0 to length-1.

check one character at a time on the basis of ASCII values. if(str[i] >= 65 and str[i] <=90), then it is uppercase letter, if(str[i] >= 97 and str[i] <=122), then it is lowercase letter, if(str[i] >= 48 and str[i] <=57), then it is number, ...

Print all the counters.

Answered by guptapreeti051181
1

Answer:

#Python program to count upper case or lower case letter in given string

str=input("Enter a string: ")

upper=0

lower=0

Similar questions