-->
当前位置:首页 > 题库

PROGRAMMING:English paragraph statistics

Luz5年前 (2021-05-10)题库518
Input a paragraph of any English article, no more than 2000 characters in length, and count the frequency of capital letters and punctuation. Note: numbers and spaces are not punctuation.
###Input format:
Give English paragraph in one line, end with carriage return, the maximum number of characters is 2000.
###Output format:
The first line outputs the number of uppercase letters;
The second line outputs the number of punctuation marks.
###Input example:
```in
Recent years have witnessed a tremendous increase in the efficiency of wireless communications. Multiple techniques have been developed to tackle the stochastic nature of the wireless channel, in an effort to fully adapt to its wide fluctuations.
```
###Output example:
```out
two
three
```
###Input example:
```in
Indoor environments have attracted special attention, since performance and security issues accentuate due to the presence of multiple scatterers in a confined space.
```
###Output example:
```out
one
two
```






answer:If there is no answer, please comment