How do I change the class Wordprocessing to only use import docx…

Question Answered step-by-step How do I change the class Wordprocessing to only use import docx… How do I change the class Wordprocessing to only use import docx (not import zipfile or import xml.etree.ElementTree as ET)?The instructions for that class are:3. Use classes and functions to organize the functionality of this program. You should have the following classes: PDFProcessing, WordProcessing, CSVProcessing, and JSONProcessing. Include the appropriate data and functions in each class to perform the requirements below6. Determine and display the number of paragraphs in demo.docx. 7. Ask the user to enter a paragraph number and display the text of that paragraph. import PyPDF2import zipfileimport xml.etree.ElementTree as ETimport csvimport jsonclass WordProcessing: # constructor def __init__(self): # read the docx file doc = zipfile.ZipFile(“demo.docx”).read(“word/document.xml”) # parse the xml document into a list of elements root = ET.fromstring(doc) # set the xml namespace self.ns = {“w”: “http://schemas.openxmlformats.org/wordprocessingml/2006/main”} # find the body tag from the xml self.body = root.find(“w:body”, self.ns) # method to get the paragraph sections def get_paragraphs(self): # find all paragraph sections under the body tag and return it return self.body.findall(“w:p”, self.ns) # method to get a specified paragraph number def paragraph(self, n): # get all the paragraphs paragraphs = self.get_paragraphs() # initialize an empty string for the paragraph paragraph = “” # loop through each elements in the specified paragraph for p in paragraphs[n – 1]: # find all texts in the element texts = p.findall(“.//w:t”, self.ns) # construct a string by concatenating the texts and append it to the paragraph paragraph += “”.join([t.text for t in texts]) # return the paragraph return paragraphImage transcription text> >>import docx 1 > >> doc = docx.Document ( ‘ demo . docx” ) 2 > >> len(doc.paragraphs) sJ 3 > >> doc. paragraph… Show more… Show moreImage transcription textDocument Title A plain paragraph withsome bold and some italic Heading, level1 Intense quote first item in… Show more… Show more  Computer Science Engineering & Technology Python Programming COSC 1337 Share QuestionEmailCopy link Comments (0)