<jupyter_start><jupyter_text>Object Oriented Programming Homework Assignment Problem 1Fill in the Line class methods to accept coordinates as a pair of tuples and return the slope and distance of the line.<jupyter_code>import math
class Line:
    
    def __init__(self,coor1,coor2):
        self.coor1=coordinate1
        self.coor2=coordinate2
    
    def distance(self):
        d=math.sqrt((self.coor2[1]-self.coor1[1])**2+(self.coor2[0]-self.coor1[0])**2)
        print(f'the line distance is : {d}')
    
    def slope(self):
        s=(self.coor2[1]-self.coor1[1])/(self.coor2[0]-self.coor1[0])
        print(f'The line slop is {s}')
# EXAMPLE OUTPUT

coordinate1 = (3,2)
coordinate2 = (8,10)

li = Line(coordinate1,coordinate2)
li.distance()
li.slope()<jupyter_output>The line slop is 1.6<jupyter_text>________ Problem 2 Fill in the class<jupyter_code>class Cylinder:
    pi=3.14
    def __init__(self,height=1,radius=1):
        self.height=height
        self.radius=radius
    
    def volume(self):
        return self.pi*self.radius**2*self.height
    
    def surface_area(self):
        return 2*self.pi*self.height*self.radius+2*self.pi*self.radius**2
    


# EXAMPLE OUTPUT
c = Cylinder(2,3)
c.volume()
c.surface_area()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12933753943217666, 'fraction_numerical': 0.03785488958990536, 'mean_word_length': 3.6313868613138687, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '356209', 'license': 'MIT', 'n_tokens_mistral': 490, 'n_tokens_neox': 469, 'n_words': 92, 'path': '03-Object Oriented Programming Homework.ipynb', 'repo_name': 'nelsawaf/assignment7', 'size': '1268'}