You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Write a python program to create a file and display the contents (dynamic number of lines) and count the occurrence of the word in the file and display the count.
#Hint:
#1. Create a File
#2. Take the input as number of lines to be written into the file
#3. Based on the number of lines get the input from the user
#4. Get the word to be searched in the file
#5. Display the count of the entered word in the file
#Input:
#1. Filename
#2. The number of lines to be written into the file