File functions - for this assignment you will write


Programming Assignment -

All your programs should be well-formatted and easy for the TAs to read and comprehend.

File Functions - For this assignment, you will write multiple functions in a single Python file names file_functions.py?. Each function will do simple task related to files. The description for each function can be found below.

count_lines

Write a function named count_lines.? The function will take one? parameter which is the name of the file to be read. This function will read the file with the provided name and count the number of lines in the file and return? the numeric count.

reverse_file

Write a function named reverse_file. ?This function will take one? parameter which will be the file name of the file to reverse. This function will open the file with the name passed in as a parameter and will print out all the lines of the file in reverse order.

search_file

Write a function named search_file?. This function will take two? parameters. The first? parameter will specify the name of the file. The second? will be a string to be searched in the file. The function will return? a number, indicating the number of lines in the file that the second parameter appears at least one time.

Attachment:- Assignment File.rar

Request for Solution File

Ask an Expert for Answer!!
Python Programming: File functions - for this assignment you will write
Reference No:- TGS02830631

Expected delivery within 24 Hours