Repository: freeCodeCamp/freeCodeCamp
Pull request #59460: feat(curriculum): add polygon area calculator lab
Author: login: zairahira
Labels: name: status: waiting review
description: To be applied to PR's that are ready for QA, especially when additional review is pending.
name: scope: curriculum
description: Lessons, Challenges, Projects and other Curricular Content in curriculum directory.
name: platform: learn
description: UI side of the client application that needs familiarity with React, Gatsby etc.
name: scope: i18n
description: language translation/internationalization. Often combined with language type label
Created: 2025-03-27T08:05:51Z | Merged: 2025-05-09T12:37:44Z

Checklist:

<!-- Please follow this checklist and put an x in each of the boxes, like this: [x]. It will ensure that our team takes your pull request seriously. -->

- [x] I have read and followed the [contribution guidelines](https://contribute.freecodecamp.org).
- [x] I have read and followed the [how to open a pull request guide](https://contribute.freecodecamp.org/how-to-open-a-pull-request/).
- [x] My pull request targets the `main` branch of freeCodeCamp.
- [x] I have tested these changes either locally on my machine, or Gitpod.

<!--If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.-->

Closes https://github.com/freeCodeCamp/CurriculumExpansion/issues/720

<!-- Feel free to add any additional description of changes below this line -->



Diff:
diff --git a/client/i18n/locales/english/intro.json b/client/i18n/locales/english/intro.json
index a6816b21933c6e..5a2dd5383a31f8 100644
--- a/client/i18n/locales/english/intro.json
+++ b/client/i18n/locales/english/intro.json
@@ -4032,7 +4032,9 @@
       },
       "lab-polygon-area-calculator": {
         "title": "Build a Polygon Area Calculator",
-        "intro": [""]
+        "intro": [
+          "In this lab, you will use object-oriented programming to calculate the areas of different polygons like squares and rectangles."
+        ]
       },
       "lecture-understanding-abstraction": {
         "title": "Understanding abstraction",
diff --git a/client/src/pages/learn/full-stack-developer/lab-polygon-area-calculator/index.md b/client/src/pages/learn/full-stack-developer/lab-polygon-area-calculator/index.md
new file mode 100644
index 00000000000000..e6d50ac6b8c0bd
--- /dev/null
+++ b/client/src/pages/learn/full-stack-developer/lab-polygon-area-calculator/index.md
@@ -0,0 +1,9 @@
+---
+title: Introduction to the Build a Polygon Area Calculator
+block: lab-polygon-area-calculator
+superBlock: full-stack-developer
+---
+
+## Introduction to the Build a Polygon Area Calculator
+
+In this lab, you will use object-oriented programming to calculate the areas of different polygons like squares and rectangles.
diff --git a/curriculum/challenges/_meta/lab-polygon-area-calculator/meta.json b/curriculum/challenges/_meta/lab-polygon-area-calculator/meta.json
new file mode 100644
index 00000000000000..771553094b2cac
--- /dev/null
+++ b/curriculum/challenges/_meta/lab-polygon-area-calculator/meta.json
@@ -0,0 +1,10 @@
+{
+  "name": "Build a Polygon Area Calculator",
+  "isUpcomingChange": true,
+  "dashedName": "lab-polygon-area-calculator",
+  "superBlock": "full-stack-developer",
+  "challengeOrder": [{ "id": "5e444147903586ffb414c94f", "title": "Build a Polygon Area Calculator" }],
+  "helpCategory": "Python",
+  "blockLayout": "link",
+  "blockType": "lab"
+}
diff --git a/curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md b/curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
new file mode 100644
index 00000000000000..dcaea0b74c1a54
--- /dev/null
+++ b/curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
@@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `Too big for picture.`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `Rectangle(width=5, height=10)`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The `Square` class should contain the following methods:
+
+    - `set_width`: Overrides the `set_width` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_height`: Overrides the `set_height` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_side`: Sets the height and width of the square equal to the side length.
+
+7. The `Square` class should be able to access the `Rectangle` class methods.
+8. If an instance of a `Square` is represented as a string, it should look like: `Square(side=9)`.
+
+## Usage example
+
+```py
+rect = Rectangle(10, 5)
+print(rect.get_area())
+rect.set_height(3)
+print(rect.get_perimeter())
+print(rect)
+print(rect.get_picture())
+
+sq = Square(9)
+print(sq.get_area())
+sq.set_side(4)
+print(sq.get_diagonal())
+print(sq)
+print(sq.get_picture())
+
+rect.set_height(8)
+rect.set_width(16)
+print(rect.get_amount_inside(sq))
+```
+
+That code should return:
+
+```bash
+50
+26
+Rectangle(width=10, height=3)
+**********
+**********
+**********
+
+81
+5.656854249492381
+Square(side=4)
+****
+****
+****
+****
+
+8
+```
+
+# --hints--
+
+You should have a `Rectangle` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Rectangle")`)) })
+```
+
+You should have a `Square` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Square")`)) })
+```
+
+The `Square` class should be a subclass of the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    
+    def test_subclass(self):
+        actual = issubclass(shape_calculator.Square, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a subclass of the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `Square` class should be a distinct class from the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None    
+    
+    def test_distinct_classes(self):
+        actual = shape_calculator.Square is not shape_calculator.Rectangle
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a distinct class from the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+A square object should be an instance of the `Square` class and the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_is_square_and_rectangle(self):
+        actual = isinstance(self.sq, shape_calculator.Square) and isinstance(self.sq, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected square object to be an instance of the Square class and the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Rectangle(3, 6)` should be `Rectangle(width=3, height=6)`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_rectangle_string(self):
+        actual = str(self.rect)
+        expected = "Rectangle(width=3, height=6)"
+        self.assertEqual(actual, expected, 'Expected string representation of rectangle to be "Rectangle(width=3, height=6)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Square(5)` should be `Square(side=5)`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_string(self):
+        actual = str(self.sq)
+        expected = "Square(side=5)"
+        self.assertEqual(actual, expected, 'Expected string representation of square to be "Square(side=5)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_area()` should return `18`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_area(self):
+        actual = self.rect.get_area()
+        expected = 18
+        self.assertEqual(actual, expected, 'Expected area of rectangle to be 18')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_area()` should return `25`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_area(self):        
+        actual = self.sq.get_area()
+        expected = 25
+        self.assertEqual(actual, expected, 'Expected area of square to be 25')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_perimeter()` should return `18`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_perimeter(self):
+        actual = self.rect.get_perimeter()
+        expected = 18
+        self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 18')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_perimeter()` should return `20`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_perimeter(self):
+        actual = self.sq.get_perimeter()
+        expected = 20
+        self.assertEqual(actual, expected, 'Expected perimeter of square to be 20')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_diagonal()` should return `6.708203932499369`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_diagonal(self):
+        actual = self.rect.get_diagonal()
+        expected = 6.708203932499369
+        self.assertEqual(actual, expected, 'Expected diagonal of rectangle to be 6.708203932499369')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_diagonal()` should return `7.0710678118654755`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_diagonal(self):
+        actual = self.sq.get_diagonal()
+        expected = 7.0710678118654755
+        self.assertEqual(actual, expected, 'Expected diagonal of square to be 7.0710678118654755')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Rectangle` class should have a different string representation after setting new values.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)        
+    
+    def test_set_attributes(self):
+        self.rect.set_width(7)
+        self.rect.set_height(8)        
+        actual = str(self.rect)
+        expected = "Rectangle(width=7, height=8)"
+        self.assertEqual(actual, expected, 'Expected string representation of rectangle after setting new values to be "Rectangle(width=7, height=8)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Square` class should have a different string representation after setting new values by using `.set_side()`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_set_attributes(self):        
+        self.sq.set_side(2)        
+        actual = str(self.sq)
+        expected = "Square(side=2)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting new values to be "Square(side=2)"')   
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Square` class should have a different string representation after setting new values by using `.set_width()` or `set_height()`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_set_attributes(self):        
+        self.sq.set_height(2)        
+        actual = str(self.sq)
+        expected = "Square(side=2)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting new values to be "Square(side=2)"')
+        self.sq.set_width(4)
+        actual = str(self.sq)
+        expected = "Square(side=4)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting width to be "Square(side=4)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return a different string representation of a `Rectangle` instance.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_rectangle_picture(self):
+        self.rect.set_width(7)
+        self.rect.set_height(3)
+        actual = self.rect.get_picture()
+        expected = "*******\\n*******\\n*******\\n"
+        self.assertEqual(actual, expected, 'Expected rectangle picture to be different.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return a different string representation of a `Square` instance.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_picture(self):
+        self.sq.set_side(2)
+        actual = self.sq.get_picture()
+        expected = "**\\n**\\n"
+        self.assertEqual(actual, expected, 'Expected square picture to be different.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return the string `Too big for picture.` if the `width` or `height` attributes are larger than `50`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_big_picture(self):
+        self.rect.set_width(51)
+        self.rect.set_height(3)
+        actual = self.rect.get_picture()
+        expected = "Too big for picture."
+        self.assertEqual(actual, expected, 'Expected message: "Too big for picture."')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(15,10).get_amount_inside(Square(5))` should return `6`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+        self.sq = shape_calculator.Square(5)
+    
+    def test_get_amount_inside(self):
+        self.rect.set_height(10)
+        self.rect.set_width(15)
+        actual = self.rect.get_amount_inside(self.sq)
+        expected = 6
+        self.assertEqual(actual, expected, 'Expected "get_amount_inside" to return 6.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(4,8).get_amount_inside(Rectangle(3, 6))` should return `1`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_get_amount_inside_two_rectangles(self):
+        rect2 = shape_calculator.Rectangle(4, 8)
+        actual = rect2.get_amount_inside(self.rect)
+        expected = 1
+        self.assertEqual(actual, expected, 'Expected "get_amount_inside" to return 1.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(2,3).get_amount_inside(Rectangle(3, 6))` should return `0`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_get_amount_inside_none(self):
+        rect2 = shape_calculator.Rectangle(2, 3)
+        actual = rect2.get_amount_inside(self.rect)
+        expected = 0
+        self.assertEqual(actual, expected, 'Expected "get_amount_inside" to return 0.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+# --seed--
+
+## --seed-contents--
+
+```py
+
+```
+
+# --solutions--
+
+```py
+class Rectangle:
+    def __init__(self, width, height):
+        self.width = width
+        self.height = height
+
+    def __str__(self):
+        return f'Rectangle(width={self.width}, height={self.height})'
+
+    def set_width(self, width):
+        self.width = width
+    
+    def set_height(self, height):
+        self.height = height
+
+    def get_area(self):
+        area = self.width * self.height
+        return area
+
+    def get_perimeter(self):
+        perimeter = self.width * 2 + self.height * 2
+        return perimeter
+    
+    def get_diagonal(self):
+        diagonal = (self.width ** 2 + self.height ** 2) ** 0.5        
+        return diagonal
+    
+    def get_picture(self):
+        if self.width < 50 and self.height < 50:
+            picture = f'{"*"*self.width}\n'*self.height            
+            return picture
+        else:            
+            return 'Too big for picture.'
+    
+    def get_amount_inside(self, polygon):
+        h_number = self.height // polygon.height
+        w_number = self.width // polygon.width
+        repetition = h_number * w_number        
+        return repetition
+        
+
+class Square(Rectangle):
+    def __init__(self, side):
+        self.width = side
+        self.height = side
+
+    def __str__(self):
+        return f'Square(side={self.width})'
+    
+    def set_width(self, side):
+        self.width = side
+        self.height = side
+    
+    def set_height(self, side):
+        self.height = side
+        self.width = side
+    
+    def set_side(self,side):
+        self.width = side
+        self.height = side
+```
diff --git a/curriculum/test/utils/mongo-ids.js b/curriculum/test/utils/mongo-ids.js
index 99618bfa0c0795..83e95cce4649b9 100644
--- a/curriculum/test/utils/mongo-ids.js
+++ b/curriculum/test/utils/mongo-ids.js
@@ -1516,6 +1516,9 @@ const duplicatedProjectIds = [
   // Budget App
   '5e44413e903586ffb414c94e',
 
+  // Polygon area calculator
+  '5e444147903586ffb414c94f',
+
   /*** Back End JavaScript ***/
 
   /*** Legacy Only ***/


Reviews:
user: login: Ksound22
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-28T12:52:18Z
user: login: moT01
body: This looks good @zairahira 👍 

I found a few minor things. Additionally, I think we should use the ID from the old project and add it to the `mongo-ids.js` file like we've done with other projects that we duplicate. What do you think? Make sure to change the filename as well if you do that.
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-03T19:14:19Z
user: login: majestic-owl448
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-05T07:54:39Z
user: login: majestic-owl448
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-05T07:55:38Z
user: login: Dario-DC
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-16T15:46:01Z
user: login: jdwilkin4
body: Starting testing this locally and left a few comments. Will resume testing this week 👍🏾 
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-20T22:03:02Z
user: login: jdwilkin4
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-21T02:42:03Z
user: login: majestic-owl448
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-21T08:02:27Z
user: login: jdwilkin4
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-28T04:32:09Z
user: login: zairahira
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-01T14:24:18Z
user: login: jdwilkin4
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-01T20:07:01Z
user: login: zairahira
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-02T05:25:12Z
user: login: jdwilkin4
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-02T16:07:21Z
user: login: jdwilkin4
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T00:02:46Z
user: login: zairahira
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-07T11:13:52Z
user: login: moT01
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-07T18:44:41Z
user: login: Dario-DC
body: I'm in favor of removing the quotes around the string in the examples/instructions. Left suggestions for that.
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T09:58:14Z
user: login: zairahira
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-08T11:13:27Z
user: login: Dario-DC
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-08T13:24:51Z
user: login: zairahira
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-09T11:03:57Z
user: login: Dario-DC
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T12:34:36Z
user: login: Dario-DC
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-09T12:35:42Z

Review comments:
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 67e3a30c447f4d2311594a58
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project you will use object oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle`, and inherit its methods and attributes.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/67e3a30c447f4d2311594a58.md
user: login: Ksound22
body: ```suggestion
In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
```
created_at: 2025-03-28T12:52:18Z
author_association: MEMBER
diff_hunk: @@ -3528,6 +3528,12 @@
           "Review the Front End Libraries concepts to prepare for the upcoming quiz."
         ]
       },
+      "lab-polygon-area-calculator": {
+        "title": "Build a Polygon Area Calculator",
+        "intro": [
+          "In this lab, you will use object oriented programming to calcute the areas of different polygons like squares and rectangles."
path: client/i18n/locales/english/intro.json
user: login: moT01
body: ```suggestion
          "In this lab, you will use object-oriented programming to calculate the areas of different polygons like squares and rectangles."
```
created_at: 2025-04-03T19:00:56Z
author_association: MEMBER
diff_hunk: @@ -3729,7 +3735,10 @@
       "kegi": { "title": "377", "intro": [] },
       "vnfu": { "title": "379", "intro": [] },
       "rlli": { "title": "380", "intro": [] },
-      "rjpv": { "title": "381", "intro": [] },
+      "In this lab, you will use object oriented programming to calcute the areas of different polygons like squares and rectangles.rjpv": {
+        "title": "381",
+        "intro": []
+      },
path: client/i18n/locales/english/intro.json
user: login: moT01
body: ```suggestion
      "rjpv": { "title": "381", "intro": [] },
```

looks like a mistake here?
created_at: 2025-04-03T19:04:00Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,9 @@
+---
+title: Introduction to the Build a Polygon Area Calculator
+block: lab-polygon-area-calculator
+superBlock: full-stack-developer
+---
+
+## Introduction to the Build a Polygon Area Calculator
+
+In this lab, you will use object oriented programming to calcute the areas of different polygons like squares and rectangles.
path: client/src/pages/learn/full-stack-developer/lab-polygon-area-calculator/index.md
user: login: moT01
body: ```suggestion
In this lab, you will use object-oriented programming to calculate the areas of different polygons like squares and rectangles.
```
created_at: 2025-04-03T19:04:28Z
author_association: MEMBER
diff_hunk: @@ -3528,6 +3528,12 @@
           "Review the Front End Libraries concepts to prepare for the upcoming quiz."
         ]
       },
+      "lab-polygon-area-calculator": {
path: client/i18n/locales/english/intro.json
user: login: majestic-owl448
body: please merge main into your branch, this is a duplicate like this

https://github.com/freeCodeCamp/freeCodeCamp/blob/36f1ea66ace05b2b1ceb2084cefd00339a4c9a5b/client/i18n/locales/english/intro.json#L3882-L3885
created_at: 2025-04-05T07:54:39Z
author_association: CONTRIBUTOR
diff_hunk: @@ -711,7 +711,12 @@
     {
       "dashedName": "python",
       "comingSoon": true,
-      "modules": []
+      "modules": [
path: curriculum/superblock-structure/full-stack.json
user: login: majestic-owl448
body: please merge main into your branch, this file has been updated
created_at: 2025-04-05T07:55:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
challengeType: 27
```
We have a new challenge type https://github.com/freeCodeCamp/freeCodeCamp/pull/59732
created_at: 2025-04-16T15:46:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: This should be capitalized, otherwise campers will get marked wrong.

<img width="991" alt="Screenshot 2025-04-20 at 2 45 41 PM" src="https://github.com/user-attachments/assets/24130068-6842-430c-af38-9a6047e07b6c" />


created_at: 2025-04-20T21:45:48Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: ```suggestion
2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
```
created_at: 2025-04-20T21:47:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: We should find a different way of providing formulaes to them. Because I can see a lot of campers copying this exactly and being confused on why it's wrong or forgetting that they need to include `self`. 

<img width="1512" alt="Screenshot 2025-04-20 at 3 01 19 PM" src="https://github.com/user-attachments/assets/6ecc425a-27f8-44b2-a13f-16a1abc2c975" />


created_at: 2025-04-20T22:01:41Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
+    - `get_picture`: Returns a string that represents the shape using lines of '\*'. The number of lines should be equal to the height and the number of '\*' in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: Not sure if '*' this is supposed to be a string inside backticks or just inside backticks.
This is what it currently looks like for me

<img width="458" alt="Screenshot 2025-04-20 at 7 20 22 PM" src="https://github.com/user-attachments/assets/2ab37176-de68-44f8-a220-c8ad912b364a" />


created_at: 2025-04-21T02:20:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: majestic-owl448
body: could we use mathjax to give the formulas in mathematical notation?
created_at: 2025-04-21T08:02:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
+    - `get_picture`: Returns a string that represents the shape using lines of '\*'. The number of lines should be equal to the height and the number of '\*' in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The square class should contain the following methods:
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: ```suggestion
6. The `Square` class should contain the following methods:
```
created_at: 2025-04-28T04:31:33Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: zairahira
body: Can we get a few suggestions on this?
I wasn't able to add the mathjax expressions, they didn't render as expected.
created_at: 2025-05-01T14:24:18Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: After playing around with this, I realized that math jax is not supported in the FSD cert. So I'll make a PR for that. Once I was able to get Math jax working here is the inline result

<img width="525" alt="Screenshot 2025-05-01 at 1 03 40 PM" src="https://github.com/user-attachments/assets/791c8557-6af1-4489-bb85-95a1f86f574d" />


```md
1. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:

    - `set_width`: Sets the width of the rectangle.
    - `set_height`: Sets the height of the rectangle.
    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
```

What do you think? 
created_at: 2025-05-01T20:07:01Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: zairahira
body: This looks good :confetti_ball: 
created_at: 2025-05-02T05:25:12Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: The PR fix for adding MathJax support for the FSD cert has been merged in. So once you pull in those latest changes, then you can use that solution above. 
created_at: 2025-05-02T16:07:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: looks like this still needs to be updated
created_at: 2025-05-06T23:59:00Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of '\*' in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: jdwilkin4
body: it looks like this should be in backticks too. otherwise it looks like this rendered on the screen.

<img width="447" alt="Screenshot 2025-05-06 at 5 01 23 PM" src="https://github.com/user-attachments/assets/3a1fcf3c-0507-4bcc-a836-4bbd6c4e0c9b" />

```suggestion
    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
```

created_at: 2025-05-07T00:02:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,881 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 23
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `rectangle` class.
+2. When a Rectangle object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (`width * height`).
+    - `get_perimeter`: Returns perimeter (`2 * width + 2 * height`).
+    - `get_diagonal`: Returns diagonal (`(width ** 2 + height ** 2) ** .5`).
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: zairahira
body: updated!

![image](https://github.com/user-attachments/assets/f468ce3c-e564-424a-a2b7-eee7c776067a)

created_at: 2025-05-07T11:13:51Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `Too big for picture.`.
```
created_at: 2025-05-08T09:07:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
3. If an instance of a `Rectangle` is represented as a string, it should look like: `Rectangle(width=5, height=10)`.
```
created_at: 2025-05-08T09:08:55Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The `Square` class should contain the following methods:
+
+    - `set_width`: Overrides the `set_width` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_height`: Overrides the `set_height` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_side`: Sets the height and width of the square equal to the side length.
+
+7. The `Square` class should be able to access the `Rectangle` class methods.
+8. If an instance of a `Square` is represented as a string, it should look like: `'Square(side=9)'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
8. If an instance of a `Square` is represented as a string, it should look like: `Square(side=9)`.
```
created_at: 2025-05-08T09:36:21Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The `Square` class should contain the following methods:
+
+    - `set_width`: Overrides the `set_width` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_height`: Overrides the `set_height` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_side`: Sets the height and width of the square equal to the side length.
+
+7. The `Square` class should be able to access the `Rectangle` class methods.
+8. If an instance of a `Square` is represented as a string, it should look like: `'Square(side=9)'`.
+
+## Usage example
+
+```py
+rect = Rectangle(10, 5)
+print(rect.get_area())
+rect.set_height(3)
+print(rect.get_perimeter())
+print(rect)
+print(rect.get_picture())
+
+sq = Square(9)
+print(sq.get_area())
+sq.set_side(4)
+print(sq.get_diagonal())
+print(sq)
+print(sq.get_picture())
+
+rect.set_height(8)
+rect.set_width(16)
+print(rect.get_amount_inside(sq))
+```
+
+That code should return:
+
+```bash
+50
+26
+Rectangle(width=10, height=3)
+**********
+**********
+**********
+
+81
+5.656854249492381
+Square(side=4)
+****
+****
+****
+****
+
+8
+```
+
+# --hints--
+
+You should have a `Rectangle` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Rectangle")`)) })
+```
+
+You should have a `Square` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Square")`)) })
+```
+
+The `Square` class should be a subclass of the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    
+    def test_subclass(self):
+        actual = issubclass(shape_calculator.Square, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a subclass of the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `Square` class should be a distinct class from the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None    
+    
+    def test_distinct_classes(self):
+        actual = shape_calculator.Square is not shape_calculator.Rectangle
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a distinct class from the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+A square object should be an instance of the `Square` class and the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_is_square_and_rectangle(self):
+        actual = isinstance(self.sq, shape_calculator.Square) and isinstance(self.sq, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected square object to be an instance of the Square class and the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Rectangle(3, 6)` should be `'Rectangle(width=3, height=6)'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
The string representation of `Rectangle(3, 6)` should be `Rectangle(width=3, height=6)`.
```
created_at: 2025-05-08T09:38:23Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The `Square` class should contain the following methods:
+
+    - `set_width`: Overrides the `set_width` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_height`: Overrides the `set_height` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_side`: Sets the height and width of the square equal to the side length.
+
+7. The `Square` class should be able to access the `Rectangle` class methods.
+8. If an instance of a `Square` is represented as a string, it should look like: `'Square(side=9)'`.
+
+## Usage example
+
+```py
+rect = Rectangle(10, 5)
+print(rect.get_area())
+rect.set_height(3)
+print(rect.get_perimeter())
+print(rect)
+print(rect.get_picture())
+
+sq = Square(9)
+print(sq.get_area())
+sq.set_side(4)
+print(sq.get_diagonal())
+print(sq)
+print(sq.get_picture())
+
+rect.set_height(8)
+rect.set_width(16)
+print(rect.get_amount_inside(sq))
+```
+
+That code should return:
+
+```bash
+50
+26
+Rectangle(width=10, height=3)
+**********
+**********
+**********
+
+81
+5.656854249492381
+Square(side=4)
+****
+****
+****
+****
+
+8
+```
+
+# --hints--
+
+You should have a `Rectangle` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Rectangle")`)) })
+```
+
+You should have a `Square` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Square")`)) })
+```
+
+The `Square` class should be a subclass of the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    
+    def test_subclass(self):
+        actual = issubclass(shape_calculator.Square, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a subclass of the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `Square` class should be a distinct class from the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None    
+    
+    def test_distinct_classes(self):
+        actual = shape_calculator.Square is not shape_calculator.Rectangle
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a distinct class from the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+A square object should be an instance of the `Square` class and the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_is_square_and_rectangle(self):
+        actual = isinstance(self.sq, shape_calculator.Square) and isinstance(self.sq, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected square object to be an instance of the Square class and the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Rectangle(3, 6)` should be `'Rectangle(width=3, height=6)'`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_rectangle_string(self):
+        actual = str(self.rect)
+        expected = "Rectangle(width=3, height=6)"
+        self.assertEqual(actual, expected, 'Expected string representation of rectangle to be "Rectangle(width=3, height=6)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Square(5)` should be `'Square(side=5)'`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
The string representation of `Square(5)` should be `Square(side=5)`.
```
created_at: 2025-05-08T09:38:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,882 @@
+---
+id: 5e444147903586ffb414c94f
+title: Build a Polygon Area Calculator
+challengeType: 27
+dashedName: build-a-polygon-area-calculator
+---
+
+# --description--
+
+In this project, you will use object-oriented programming to create a `Rectangle` class and a `Square` class. The `Square` class should be a subclass of `Rectangle` and inherit its methods and attributes.
+
+**Objective:** Fulfill the user stories below and get all the tests to pass to complete the lab.
+
+**User Stories:**
+
+1. You should create a `Rectangle` class.
+
+2. When a `Rectangle` object is created, it should be initialized with `width` and `height` attributes. The class should also contain the following methods:
+
+    - `set_width`: Sets the width of the rectangle.
+    - `set_height`: Sets the height of the rectangle.
+    - `get_area`: Returns area (\\( \text{width} \times \text{height} \\)).
+    - `get_perimeter`: Returns perimeter \\( 2(\text{width} + \text{height}) \\).
+    - `get_diagonal`: Returns diagonal \\( \sqrt{\text{width}^2 + \text{height}^2} \\).
+    - `get_picture`: Returns a string that represents the shape using lines of `*`. The number of lines should be equal to the height and the number of `*` in each line should be equal to the width. There should be a new line (`\n`) at the end of each line. If the width or height is larger than `50`, this should return the string: `'Too big for picture.'`.
+    - `get_amount_inside`: Takes another shape (square or rectangle) as an argument. Returns the number of times the passed in shape could fit inside the shape (with no rotations). For instance, a rectangle with a width of `4` and a height of `8` could fit in two squares with sides of `4`.
+
+3. If an instance of a `Rectangle` is represented as a string, it should look like: `'Rectangle(width=5, height=10)'`.
+
+4. You should create a `Square` class that subclasses `Rectangle`.
+5. When a `Square` object is created, it should be initialized with a single side length. The `__init__` method should store the side length in both the `width` and `height` attributes from the `Rectangle` class.
+6. The `Square` class should contain the following methods:
+
+    - `set_width`: Overrides the `set_width` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_height`: Overrides the `set_height` method from the `Rectangle` class. It should set the width and height to the side length.
+    - `set_side`: Sets the height and width of the square equal to the side length.
+
+7. The `Square` class should be able to access the `Rectangle` class methods.
+8. If an instance of a `Square` is represented as a string, it should look like: `'Square(side=9)'`.
+
+## Usage example
+
+```py
+rect = Rectangle(10, 5)
+print(rect.get_area())
+rect.set_height(3)
+print(rect.get_perimeter())
+print(rect)
+print(rect.get_picture())
+
+sq = Square(9)
+print(sq.get_area())
+sq.set_side(4)
+print(sq.get_diagonal())
+print(sq)
+print(sq.get_picture())
+
+rect.set_height(8)
+rect.set_width(16)
+print(rect.get_amount_inside(sq))
+```
+
+That code should return:
+
+```bash
+50
+26
+Rectangle(width=10, height=3)
+**********
+**********
+**********
+
+81
+5.656854249492381
+Square(side=4)
+****
+****
+****
+****
+
+8
+```
+
+# --hints--
+
+You should have a `Rectangle` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Rectangle")`)) })
+```
+
+You should have a `Square` class.
+
+```js
+({ test: () => assert(runPython(`_Node(_code).has_class("Square")`)) })
+```
+
+The `Square` class should be a subclass of the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    
+    def test_subclass(self):
+        actual = issubclass(shape_calculator.Square, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a subclass of the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `Square` class should be a distinct class from the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None    
+    
+    def test_distinct_classes(self):
+        actual = shape_calculator.Square is not shape_calculator.Rectangle
+        expected = True
+        self.assertEqual(actual, expected, 'Expected Square class to be a distinct class from the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+A square object should be an instance of the `Square` class and the `Rectangle` class.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_is_square_and_rectangle(self):
+        actual = isinstance(self.sq, shape_calculator.Square) and isinstance(self.sq, shape_calculator.Rectangle)
+        expected = True
+        self.assertEqual(actual, expected, 'Expected square object to be an instance of the Square class and the Rectangle class.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Rectangle(3, 6)` should be `'Rectangle(width=3, height=6)'`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_rectangle_string(self):
+        actual = str(self.rect)
+        expected = "Rectangle(width=3, height=6)"
+        self.assertEqual(actual, expected, 'Expected string representation of rectangle to be "Rectangle(width=3, height=6)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The string representation of `Square(5)` should be `'Square(side=5)'`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_string(self):
+        actual = str(self.sq)
+        expected = "Square(side=5)"
+        self.assertEqual(actual, expected, 'Expected string representation of square to be "Square(side=5)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_area()` should return `18`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_area(self):
+        actual = self.rect.get_area()
+        expected = 18
+        self.assertEqual(actual, expected, 'Expected area of rectangle to be 18')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_area()` should return `25`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_area(self):        
+        actual = self.sq.get_area()
+        expected = 25
+        self.assertEqual(actual, expected, 'Expected area of square to be 25')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_perimeter()` should return `18`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_perimeter(self):
+        actual = self.rect.get_perimeter()
+        expected = 18
+        self.assertEqual(actual, expected, 'Expected perimeter of rectangle to be 18')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_perimeter()` should return `20`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_perimeter(self):
+        actual = self.sq.get_perimeter()
+        expected = 20
+        self.assertEqual(actual, expected, 'Expected perimeter of square to be 20')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Rectangle(3, 6).get_diagonal()` should return `6.708203932499369`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_diagonal(self):
+        actual = self.rect.get_diagonal()
+        expected = 6.708203932499369
+        self.assertEqual(actual, expected, 'Expected diagonal of rectangle to be 6.708203932499369')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+`Square(5).get_diagonal()` should return `7.0710678118654755`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_diagonal(self):
+        actual = self.sq.get_diagonal()
+        expected = 7.0710678118654755
+        self.assertEqual(actual, expected, 'Expected diagonal of square to be 7.0710678118654755')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Rectangle` class should have a different string representation after setting new values.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)        
+    
+    def test_set_attributes(self):
+        self.rect.set_width(7)
+        self.rect.set_height(8)        
+        actual = str(self.rect)
+        expected = "Rectangle(width=7, height=8)"
+        self.assertEqual(actual, expected, 'Expected string representation of rectangle after setting new values to be "Rectangle(width=7, height=8)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Square` class should have a different string representation after setting new values by using `.set_side()`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_set_attributes(self):        
+        self.sq.set_side(2)        
+        actual = str(self.sq)
+        expected = "Square(side=2)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting new values to be "Square(side=2)"')   
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+An instance of the `Square` class should have a different string representation after setting new values by using `.set_width()` or `set_height()`.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_set_attributes(self):        
+        self.sq.set_height(2)        
+        actual = str(self.sq)
+        expected = "Square(side=2)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting new values to be "Square(side=2)"')
+        self.sq.set_width(4)
+        actual = str(self.sq)
+        expected = "Square(side=4)"
+        self.assertEqual(actual, expected, 'Expected string representation of square after setting width to be "Square(side=4)"')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return a different string representation of a `Rectangle` instance.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.rect = shape_calculator.Rectangle(3, 6)
+    
+    def test_rectangle_picture(self):
+        self.rect.set_width(7)
+        self.rect.set_height(3)
+        actual = self.rect.get_picture()
+        expected = "*******\\n*******\\n*******\\n"
+        self.assertEqual(actual, expected, 'Expected rectangle picture to be different.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return a different string representation of a `Square` instance.
+
+```js
+({
+  test: () => {
+    pyodide.FS.writeFile('/home/pyodide/shape_calculator.py', code);
+    pyodide.FS.writeFile('/home/pyodide/test_module.py',`
+import unittest
+import shape_calculator
+from importlib import reload
+reload(shape_calculator)
+class UnitTests(unittest.TestCase):
+    maxDiff = None
+    def setUp(self):
+        self.sq = shape_calculator.Square(5)
+    
+    def test_square_picture(self):
+        self.sq.set_side(2)
+        actual = self.sq.get_picture()
+        expected = "**\\n**\\n"
+        self.assertEqual(actual, expected, 'Expected square picture to be different.')    
+`);
+    const testCode = `
+from unittest import main
+from importlib import reload
+import test_module
+reload(test_module)
+t = main(module='test_module', exit=False)
+t.result.wasSuccessful()
+`;
+    const out = runPython(testCode);
+    assert(out);
+  }
+})
+```
+
+The `.get_picture()` method should return the string `'Too big for picture.'` if the `width` or `height` attributes are larger than `50`.
path: curriculum/challenges/english/25-front-end-development/lab-polygon-area-calculator/5e444147903586ffb414c94f.md
user: login: Dario-DC
body: ```suggestion
The `.get_picture()` method should return the string `Too big for picture.` if the `width` or `height` attributes are larger than `50`.
```
created_at: 2025-05-08T09:39:29Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1521,7 +1521,10 @@ const duplicatedProjectIds = [
   /*** Legacy Only ***/
 
   // Caesars Cipher
-  '56533eb9ac21ba0edf2244e2'
+  '56533eb9ac21ba0edf2244e2',
+
+  // Polygon area calculator
+  '5e444147903586ffb414c94f'
path: curriculum/test/utils/mongo-ids.js
user: login: Dario-DC
body: Can we move this below the budget app?

Also, I know that it was not added in this PR, but why do we have the Caesar cipher here?
created_at: 2025-05-08T09:53:02Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1521,7 +1521,10 @@ const duplicatedProjectIds = [
   /*** Legacy Only ***/
 
   // Caesars Cipher
-  '56533eb9ac21ba0edf2244e2'
+  '56533eb9ac21ba0edf2244e2',
+
+  // Polygon area calculator
+  '5e444147903586ffb414c94f'
path: curriculum/test/utils/mongo-ids.js
user: login: zairahira
body: This Caesar Cipher is part of the legacy [JS cert](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher).

I have changed the order for the polygon area calculator.
created_at: 2025-05-08T11:13:27Z
author_association: MEMBER
diff_hunk: @@ -1521,7 +1521,10 @@ const duplicatedProjectIds = [
   /*** Legacy Only ***/
 
   // Caesars Cipher
-  '56533eb9ac21ba0edf2244e2'
+  '56533eb9ac21ba0edf2244e2',
+
+  // Polygon area calculator
+  '5e444147903586ffb414c94f'
path: curriculum/test/utils/mongo-ids.js
user: login: Dario-DC
body: > This Caesar Cipher is part of the legacy [JS cert](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher).

But I don't see it repeated anywhere. And [the one we have for Python](https://github.com/freeCodeCamp/freeCodeCamp/pull/60198) is a different implementation (step-based also). Am I missing something?
created_at: 2025-05-08T13:24:51Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1521,7 +1521,10 @@ const duplicatedProjectIds = [
   /*** Legacy Only ***/
 
   // Caesars Cipher
-  '56533eb9ac21ba0edf2244e2'
+  '56533eb9ac21ba0edf2244e2',
+
+  // Polygon area calculator
+  '5e444147903586ffb414c94f'
path: curriculum/test/utils/mongo-ids.js
user: login: zairahira
body: Yes it's not repeated anywhere, I am not sure why is it in this file already.
created_at: 2025-05-09T11:03:56Z
author_association: MEMBER
diff_hunk: @@ -1521,7 +1521,10 @@ const duplicatedProjectIds = [
   /*** Legacy Only ***/
 
   // Caesars Cipher
-  '56533eb9ac21ba0edf2244e2'
+  '56533eb9ac21ba0edf2244e2',
+
+  // Polygon area calculator
+  '5e444147903586ffb414c94f'
path: curriculum/test/utils/mongo-ids.js
user: login: Dario-DC
body: Let's merge this PR. We can remove later if needed.
created_at: 2025-05-09T12:35:42Z
author_association: CONTRIBUTOR

PR comments:
user: login: realamanvats
created_at: 2025-03-27T21:47:42Z
body: Great work! Looking forward to contributing. 🚀
author_association: NONE
user: login: zairahira
created_at: 2025-04-04T09:52:14Z
body: Hi @moT01,
Thanks for the feedback.

I have updated the challenge ID as the lab is very similar to the original project.

author_association: MEMBER
user: login: Dario-DC
created_at: 2025-04-16T15:49:55Z
body: ~We need to update the `full-stack.json` file as well~ @zairahira
Edit: just saw it's already done :+1: 
author_association: CONTRIBUTOR
user: login: majestic-owl448
created_at: 2025-04-16T15:54:56Z
body: @Dario-DC see #59552
author_association: CONTRIBUTOR
user: login: Akshaj-mishra
created_at: 2025-05-09T13:08:42Z
body: by mistake i added here sorry

author_association: NONE
user: login: Akshaj-mishra
created_at: 2025-05-09T13:14:55Z
body: i was trying to commit in #603244 can any one please explain what happen
author_association: NONE
user: login: majestic-owl448
created_at: 2025-05-09T17:04:59Z
body: @Akshaj-mishra reach out on [discord](https://chat.freecodecamp.org) or the [forum](https://forum.freecodecamp.org) if you need help
author_association: CONTRIBUTOR
user: login: Akshaj-mishra
created_at: 2025-05-09T18:13:01Z
body: Ok thanks for the response will try to learn and improve

On Fri, 9 May 2025, 10:35 pm Ilenia, ***@***.***> wrote:

> *ilenia-magoni* left a comment (freeCodeCamp/freeCodeCamp#59460)
> <https://github.com/freeCodeCamp/freeCodeCamp/pull/59460#issuecomment-2867312706>
>
> @Akshaj-mishra <https://github.com/Akshaj-mishra> reach out on discord
> <https://chat.freecodecamp.org> or the forum
> <https://forum.freecodecamp.org> if you need help
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/freeCodeCamp/freeCodeCamp/pull/59460#issuecomment-2867312706>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BBZFVTCQCGKDVRV25FWCXCD25TN5TAVCNFSM6AAAAABZ4I3Q3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNRXGMYTENZQGY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>

author_association: NONE