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
0
Answer:
no oy usnr ejei2jr. feiieieirj g ii unwnwn2 wn9g0bodj220f
Answered by
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
Geography,
2 months ago
Math,
4 months ago
Computer Science,
4 months ago
Business Studies,
10 months ago