Scientific Computing with Python Projects - Polygon Area Calculator

Tell us what’s happening:
It wont run duo to issues with the README.md file???
I have tried several things, cloning new project, changing the spacing, etc. but i constantly get this issue no matter what i do:
File “README.md”, line 3
This is the boilerplate for the Polygon Area Calculator project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/scientific-computing-with-python/scientific-computing-with-python-projects/polygon-area-calculator
^
SyntaxError: invalid syntax

Your code so far
class Rectangle:
def init(self, width, height):
self.width = width
self.height = height

def set_width(self, width):
    self.width = width

def set_height(self, height):
    self.height = height

def get_area(self):
    return self.width * self.height

def get_perimeter(self):
    return 2 * self.width + 2 * self.height

def get_diagonal(self):
    return (self.width ** 2 + self.height ** 2) ** 0.5

def get_picture(self):
    if self.width > 50 or self.height > 50:
        return "Too big for picture."

    picture = ""
    for i in range(self.height):
        picture += "*" * self.width + "\n"
    return picture

def get_amount_inside(self, other_shape):
    if isinstance(other_shape, Rectangle):
        return (self.width // other_shape.width) * (self.height // other_shape.height)
    else:
        return (self.width // other_shape.side) * (self.height // other_shape.side)

def __str__(self):
    return f"Rectangle(width={self.width}, height={self.height})"

class Square(Rectangle):
def init(self, side):
super().init(side, side)
self.side = side

def set_side(self, side):
    self.side = side
    self.width = side
    self.height = side

def __str__(self):
    return f"Square(side={self.side})"

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0

Challenge: Scientific Computing with Python Projects - Polygon Area Calculator

Link to the challenge:

You’ll need to post a link to the failing repl.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.