#2811. 大写字母统计
大写字母统计
说明
写一个函数,找出给定字符串中大写字母字符(即'A'-'Z'这26个字母)的个数(如字符串”China Computer Wrold”中大写字母字符的个数为3个)。要求用子函数和Driver的形式编写代码。
input:
helloABCworld
output:
3
输入格式
字符串,可能包含空格输出格式
大写字母的个数hello ABC world
3
写一个函数,找出给定字符串中大写字母字符(即'A'-'Z'这26个字母)的个数(如字符串”China Computer Wrold”中大写字母字符的个数为3个)。要求用子函数和Driver的形式编写代码。
input:
helloABCworld
output:
3
hello ABC world
3