write a program to input a string and print number of upper and lower case letters in it
Answers
Answered by
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
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
Geography,
19 days ago
Computer Science,
19 days ago
Science,
1 month ago
English,
9 months ago
Social Sciences,
9 months ago