<jupyter_start><jupyter_text>Exercice 1: Write a Python class named square constructed by a length and two methods which will compute the area and the perimeter of the square.<jupyter_code>class square():
    def __init__(self,width,length):
        self.width=width
        self.length=length
    def perimeter(self):
        return 2*(self.width+self.length)
    def area(self):
        return (self.width)*(self.length)
    pass
square1=square(3,2)
print(square1.perimeter())
print(square1.area())<jupyter_output>10
6<jupyter_text>Exercice 2: Write a python class rectangle that inherits from the square class.<jupyter_code>class rectangle(square):
        def __init__(self,width,length):
            super().__init__(width, length)
        pass
a=rectangle(2,4)
print(a.perimeter())
print(a.area())<jupyter_output>12
8<jupyter_text>Exercice 3:<jupyter_code>class SampleClass:

    def __init__(self, a):
        self.a = a

x = SampleClass(3)
print(x.a)
x.a = 23
print(x.a)<jupyter_output>3
23
{'fraction_non_alphanumeric': 0.11623246492985972, 'fraction_numerical': 0.023046092184368736, 'mean_word_length': 4.257894736842105, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '352679', 'license': 'MIT', 'n_tokens_mistral': 357, 'n_tokens_neox': 342, 'n_words': 80, 'path': 'exercices/part4.ipynb', 'repo_name': 'Imane-code-ux/python-bootcamp', 'size': '998'}