Skip to content

SoniaDudiy/Geometric-Master

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geometric Master

Basis for development

The program was developed in accordance with the test task of DiversiPy

Python Developer: Sofiia Dudii

Shape Calculator

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

Features

  • 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.

Installation

  1. Clone the repository:
    git clone https://github.com/SoniaDudiy/Test-task-DiversiPy-.git
    
  2. Run the program:
    python main.py  
    
    

Usage

  1. Run the program.
  2. Follow the prompts to input the shape and its parameters.
  3. The program will calculate and display the area and perimeter of the specified shape.

Example

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages