Computer Science, asked by priyadharshini1821, 4 months ago

write a program to search a word in file and display the no of file and display the no of time the word occurs in the file the search word should be input by the user

Answers

Answered by DONALDDUCK99945
0

Answer:

no oy usnr ejei2jr. feiieieirj g ii unwnwn2 wn9g0bodj220f

Answered by Anonymous
1

Answer:

hello,

its a python program

Explanation:

fn=input("enter the file name")

word=input("enter the word")

f=open(fn,"r")

s=f.read()

l=s.split()

count=0

for i in l:

   if i.upper()==word:

       count+=1

   else:

       continue

print(count,"is the total number of times",word,"occurs")

hope it helps you

please mark brainliest

@ItzSnowySecret07

Similar questions