-
Notifications
You must be signed in to change notification settings - Fork 0
/
charCount.py
27 lines (24 loc) · 1014 Bytes
/
charCount.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
'''
During the fall season the Place Hill country receives lots of students visa
applications for admissions in the various degree colleges of the country.
The country code of all the visa applications received online per day is
stored in the form of strings tagged 'a-z' or 'A-Z in the visa center database.
Each character of the string represents the country code. The string is case
sensitive and lowercase letters represent one country and capital ters represent
another country. The visa center wishes to know the count of the applications of
a particular country code received per day.
Write an algorithm to help the visa center find out the count of the application
of a particular country code received per day
Example :
Input: aBAboxydaAAA
A
Output: 4
Explanation: The character A appears 4 times in the string. Hence the output is 4.
'''
Data = input()
char = input()
Total = 0
for letter in Data :
if letter == char:
Total = Total + 1
print(Total)