PYTHON PROGRAMMING Problems: B. Character Counter of BSIT Objectives - Create a class named BsitObjectives - In the class constructor, the file named bsit_objectives.txt will be opened and read. The text file contains the following texts: The Bachelor of Science in Information Technology (BSIT) program aims to produce graduates who can: 1. apply knowledge of utilization of both hardware and software technologies involving planning, installing, customizing, operating, managing and administering, and maintaining information technology infrastructure that provides computing solutions to address the needs of an organization; 2. conduct relevant researches and extension program activities in the field of information technology; 3. promote the development and transfer of appropriate information technology; 4. promote environmental preservation and protection on projects and enterprises related to information technology; and 5. become morally upright IT professionals with primary or secondary job roles.
PYTHON
- Create a class named BsitObjectives
- In the class constructor, the file named bsit_objectives.txt will be opened and read. The text file contains the following texts:
The Bachelor of Science in Information Technology (BSIT) program aims to produce graduates who can:
1. apply knowledge of utilization of both hardware and software technologies involving planning, installing, customizing, operating, managing and administering, and maintaining information technology infrastructure that provides computing solutions to address the needs of an organization;
2. conduct relevant researches and extension program activities in the field of information technology;
3. promote the development and transfer of appropriate information technology;
4. promote environmental preservation and protection on projects and enterprises related to information technology; and
5. become morally upright IT professionals with primary or secondary job roles.
The occurrences of each character will be counted. Here's the hint on how to count each character:
mystr = list("the quick brown fox")
data = {k: mystr.count(k) for k in mystr}
Print a formatted display of the result (in reverse order of the character count) as shown in sample output below:
Character Count:
whitespace = 95
"o" = 71
"n" = 68
"e" = 59
"a" = 52
"i" = 52
"t" = 52
"r" = 48
"s" = 28
"l" = 24
"c" = 22
"g" = 22
"p" = 22
"d" = 22
"m" = 20
"h" = 18
"f" = 16
"u" = 10
"y" = 9
"v" = 8
"." = 6
"w" = 5
newline = 5
"," = 5
"T" = 4
";" = 4
"I" = 3
"z" = 3
"b" = 3
"B" = 2
"S" = 2
"j" = 2
"(" = 1
")" = 1
":" = 1
"1" = 1
"k" = 1
"2" = 1
"x" = 1
"3" = 1
"4" = 1
"5" = 1
Step by step
Solved in 2 steps