+ 1
Write a program that accepts a sentence and calculate the number of upper case and lower case. Ex -Hello.
I want coding and explainations
2 ответов
+ 2
I'll just answer in theory, use r"[A-Z]" and re.findall to collect a list of capital letters in the string. Of course though you must first convert the string into a list so you can see observe each character. Length of that list is the number of caps letters. Figure out how to do it for lowercase as well.
Edit: Complete the python course, if you did you would have known this.
+ 14
Did you post another homework here, right? :3
You can use lower( ) and upper( ), do your homework with your efforts only, trust me, you'll learn new things and it will help you to understand better Python. :)