PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
text = "hello my name is khan i am 80 years old"
words_r = len([i for i in text.split(" ") if not i.isdigit() and len(i)>1])
list = []
list_2 = []
total= 0
T = [",",".",":",";","!","?"]
totall=0
total_c = 0
total_s = 0
total_c2 = []
total_s2 = []
total_D = 0
if text == "":
print("please enter a text.")
else:
for i in text:
if i not in T and i != " " and not i.isdigit():
total+=1
if i.isdigit():
total_D+=1
if i != " ":
words= text.count(i)
s= i,words
j = list.append(s)
if i.isupper() and i not in T:
total_c +=1
if i.islower() and i not in T:
total_s +=1
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run