Skip to content

BlackBossX/Area-Volume-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Area and Volume Calculator

Welcome to the Area and Volume Calculator repository! This Python application provides an interactive interface for calculating various geometrical areas and volumes. Whether you're a student, engineer, or math enthusiast, this tool makes calculations quick and simple.

Features

Area Calculations

  • Triangle: Base and height-based area calculation.
  • Square/Rectangle: Calculates area using length and width.
  • Circle: Computes area using radius.
  • Sector: Calculates area using radius and angle.
  • Parallelogram: Computes area using base and height.
  • Trapezoid: Calculates area using base, top bar, and height.

Volume Calculations

  • Cube: Computes volume using the side length.
  • Cuboid: Computes volume using base, height, and width.
  • Triangular Prism: Calculates volume using base, height, and length.
  • Cylinder: Computes volume using radius and height.
  • Square Pyramid: Calculates volume using base length and height.
  • Sphere: Computes volume using radius.

How to Use

Prerequisites

  • Python 3.x must be installed on your system.

Running the Application

  1. Clone this repository:
    git clone https://github.com/BlackBossX/Area-Volume-Calculator.git
  2. Navigate to the project directory:
    cd Area-Volume-Calculator
  3. Run the Python script:
    python calculator.py
  4. Follow the prompts to select the desired calculation.

Example Input

For calculating the area of a triangle:

  1. Select "Area Calculator" by entering 1.
  2. Choose "Triangle Area" by entering 1.
  3. Enter the base and height values as prompted.
  4. View the calculated area result.

Code Structure

  • Functions: Each shape has its dedicated function for area or volume calculation.
  • User Interface: The program provides an interactive text-based menu for users to select the desired calculation type and shape.

Example Output

--------------------------------------------------
     Area and Volume Calculator                   
         by BlackBossX                            
             Visit for more: www.blackboss.xyz    
--------------------------------------------------
Enter (1) Area Calculator
Enter (2) Volume Calculator
1
--------------------------------------------------
Enter (1) Triangle Area
Enter (2) Square Area
...
Enter Base Size:
10
Enter Height Size:
5
Triangle's area:  25.0

Contributing

Contributions are welcome! Feel free to fork the repository and submit a pull request.

Contact

For support, email [email protected]


Happy Calculating! 😊

Releases

No releases published

Packages

No packages published

Languages