- 5

Write a py program to find the percentage of uppercase letters,lowercase letters,digits and specialcharacters in a given string.

Please HELP ME!!!!!!!

7th Oct 2019, 11:28 AM
Thakur Lion😎😎
Thakur Lion😎😎 - avatar
6 Respostas
+ 4
Thakur Lion Have you tried by yourself. If yes then share your code here so we can check that what problems you are facing. If you didn't try then I will just say that first try to do by yourself to getting more coding knowledge. There maybe many approach to solve any problem.
7th Oct 2019, 11:42 AM
AÍąJ
AÍąJ - avatar
+ 2
I'll give you a hint how to do this problem: Make logic to find upper case and lower case letters and store it as integer type. Same do with special characters (refer ASCII code table which helps you to find special characters) And same with digits. Then store all in integer type and sum them then take percentage of that number. That's how you can go through this problem. Try yourself it makes your logics clear.
7th Oct 2019, 11:34 AM
Chirag Kumar
Chirag Kumar - avatar
7th Oct 2019, 1:51 PM
Thakur Lion😎😎
Thakur Lion😎😎 - avatar
0
See this and correct me
7th Oct 2019, 1:51 PM
Thakur Lion😎😎
Thakur Lion😎😎 - avatar
0
Thakur Lion First thing is that white space matter in Python so you have to put white space at the begining of each print statement. Second thing is that you have to take 3 variable for each calculation. And 3rd thing is that don't do calculation within the loop. Do calculation outside the loop because you have single count value and length of String.
7th Oct 2019, 2:53 PM
AÍąJ
AÍąJ - avatar