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.

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
Get step-by-step solutions from verified subject matter experts
