Basis for development
The program was developed in accordance with the test task of DiversiPy
Python Developer: Sofiia Dudii
Geometric Master - this is a simple Python program that calculates the area and perimeter of various 2D shapes. The program supports calculating the area and perimeter of the following shapes:
- Square
- Rectangle
- Triangle
- Circle
- Calculates area and perimeter for squares, rectangles, triangles, and circles.
- Allows user input for shape parameters from the command line.
- Includes unit tests to ensure correctness of calculations.
- Clone the repository:
git clone https://github.com/SoniaDudiy/Test-task-DiversiPy-.git - Run the program:
python main.py
- Run the program.
- Follow the prompts to input the shape and its parameters.
- The program will calculate and display the area and perimeter of the specified shape.
Shape Area and Perimeter Calculator
-----------------------------------
Available Shapes: Square, Rectangle, Triangle, Circle
Enter the name of the shape: square
Enter the length of a side: 5
Area of the Square: 25
Perimeter of the Square: 20
## Testing
To run the unit tests, make sure you have `pytest` installed, then run:
pytest -s test.py