Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 399 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 26 Jul 2017 My Price 7.00

analyze a text file


Add method words() to class Textfile from Problem 8.28. It takes no input and returns a list, without duplicates, of words in the file.

 

Problem 8.28

Develop a class Text file that provides methods to analyze a text file. The class Text file will support a constructor that takes as input a file name (as a string) and instantiates a Text file object associated with the corresponding text file. The Text file class should support methods nchars(), nwords(), and nlines() that return the number of characters, words, and lines, respectively, in the associated text file. The class should also support methods read() and read lines() that return the content of the text file as a string or as a list of lines, respectively, just as we would expect for file objects. Finally, the class should support method grep () that takes a target string as input and searches for lines in the text file that contain the target string. The method returns the lines in the file containing the target string; in addition, the method should print the line number, where line numbering starts with 0.

Answers

(5)
Status NEW Posted 26 Jul 2017 09:07 PM My Price 7.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------sol-----------uti-----------on.-----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- ca-----------tch-----------

Not Rated(0)