Question: CSC 2230 Computer Programming for Engineers. This is python jupyter notebook. write a function that takes a file name (string) and a word (string) and

CSC 2230 Computer Programming for Engineers. This is python jupyter notebook.

CSC 2230 Computer Programming for Engineers. This is python jupyter notebook. write

write a function that takes a file name (string) and a word (string) and returns True f that word is found anywhere in the file, otherwise returns False. For your reference (if you need it),here's a quick example code to print lines in a file: filename "hello.txt" file -open(filename, r" for line in file: print line Also remember the "in" operator that checks if a string is inside another. Now write your function below: In def checkIfFilecontains (filename, targetWord)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!