Detailed Print – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
Solved Problem#PYTHON#7152

Problem Statement - B04B-2019S-C1

Write a method/function ISTOUPCOUNT() in python to read contents from a text file WRITER>TXT, to count and display the occurrence of the word “IS” or “TO” or “UP”.

For example:

If the content of the file is

IT IS UP TO US TO TAKE CARE OF OUR SURROUNDING. IT IS NOT POSSIBLE ONLY FOR THE GOVERNMENT TO TAKE RESPONSIBILITY

The method/function should display

Count of IS TO and UP is 6

Solution

Click to open popup