<jupyter_start><jupyter_text>Circle<jupyter_code>class Circle:

    def __init__(self, positionX, positionY, rad):
        self.posX = positionX
        self.posY = positionY
        self.radius = rad
        self.t = np.linspace(0, 1, 100)

        self.circle_plot()

    def __str__(self):
        return f'Your circle centered at {self.posX:.2f},{self.posY:.2f} has radius of {self.radius:.2f} with an area of {self.calculateArea():.2f} and a circumfrence of {self.calculateCircumfrence():.2f}.'

    def circle_plot(self):
        plt.figure()
        self.updateVisualization()

    def updateVisualization(self):
        xdata = np.cos(2*np.pi*self.t)*self.radius + self.posX
        ydata = np.sin(2*np.pi*self.t)*self.radius + self.posY
        plt.plot(xdata, ydata, lw=2)
        plt.xlabel('X')
        plt.ylabel('Y')
        plt.axis('equal')
        plt.show()

    def calculateArea(self):
        area = np.pi * self.radius**2
        return area

    def calculateCircumfrence(self):
        circumfrence = 2 * np.pi * self.radius
        return circumfrence<jupyter_output><empty_output><jupyter_text>Circle 1<jupyter_code>my_circle = Circle(0, 0, 5)
print(my_circle)
my_circle.posX = 5
my_circle.circle_plot()
print(my_circle)<jupyter_output>Your circle centered at 5.00,0.00 has radius of 5.00 with an area of 78.54 and a circumfrence of 31.42.<jupyter_text>Polygon<jupyter_code>class polygon:
    def __init__(self,positionX, positionY, length, number_verticies, rotation_angle):
        self.posX = positionX
        self.posY = positionY
        self.rad = length
        self.numV = number_verticies
        self.rotAng = rotation_angle

        self.t = np.linspace(0,1,self.numV+1)

        self.polyplot()

    def __str__(self):
        return f'Your polygon has {self.numV:.0f} sides with a perimeter of {self.calculatePerimeter():.2f}'

    def polyplot(self):
        plt.figure()
        self.updateVisualization()

    def updateVisualization(self):
        xdata = np.cos(2*np.pi*self.t+self.rotAng)*self.rad + self.posX
        ydata = np.sin(2*np.pi*self.t+self.rotAng)*self.rad + self.posY
        plt.plot(xdata, ydata, lw=2)
        plt.xlabel('X')
        plt.ylabel('Y')
        plt.axis('equal')
        plt.show()

    def calculatePerimeter(self):
        perimeter = self.numV * self.rad
        return perimeter

my_square = polygon(0,0,4,4,90)
print(my_square)
my_octogon = polygon(0,0, 2, 8, 0)
print(my_octogon)<jupyter_output>Your polygon has 8 sides with a perimeter of 16.00
{'fraction_non_alphanumeric': 0.1254451919271864, 'fraction_numerical': 0.024139295607439652, 'mean_word_length': 2.8892307692307693, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '75616', 'license': 'MIT', 'n_tokens_mistral': 944, 'n_tokens_neox': 888, 'n_words': 178, 'path': 'Python/CirclePolygon.ipynb', 'repo_name': 'tulimid1/OOP', 'size': '2527'}