MCPcopy Create free account
hub / github.com/geekcomputers/Python / lowercase

Function lowercase

file_handle/File handle text/question 5.py:19–36  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

17
18
19def lowercase(file_path):
20 try:
21 with open(file_path) as F:
22 word_counter = Counter(F.read())
23
24 print(
25 f"The total number of lower case letters are {word_counter.get_total_lower()}"
26 )
27 time.sleep(0.5)
28 print(
29 f"The total number of upper case letters are {word_counter.get_total_upper()}"
30 )
31 time.sleep(0.5)
32 print(f"The total number of letters are {word_counter.get_total()}")
33 time.sleep(0.5)
34
35 except FileNotFoundError:
36 print("File is not exist.. Please check AGAIN")
37
38
39if __name__ == "__main__":

Callers 1

question 5.pyFile · 0.70

Calls 4

get_total_lowerMethod · 0.95
get_total_upperMethod · 0.95
get_totalMethod · 0.95
CounterClass · 0.90

Tested by

no test coverage detected