解题思路:
注意事项:
参考代码:
str1=input()
mu,number,kong,n=0,0,0,0
list=["0","1","2","3","4","5","6","7","8","9"]
for i in str1:
if "a"<=i<="z" or "A"<=i<="Z":
mu+=1
elif i in list:
number+=1
elif ord(i)==32:
kong+=1
else:
n+=1
print(mu,number,kong,n,end=" ")
0.0分
0 人评分
IP判断 (C++代码)浏览:728 |
C语言程序设计教程(第三版)课后习题6.5 (Java代码)浏览:1252 |
C二级辅导-等差数列 (C语言代码)浏览:628 |
Tom数 (C++代码)浏览:869 |
C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) (C语言代码)浏览:799 |
哥德巴赫曾猜测 (C语言代码)浏览:1150 |
WU-printf基础练习2 (C++代码)浏览:2061 |
1014题解浏览:524 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:585 |
C语言程序设计教程(第三版)课后习题6.1 (C语言代码)浏览:532 |