Skip to main content

A Geometric Shape Calculator Tool

Project description

Geometool - Geometric Shape Calculation Library

MB Task-1

This Python package provides functions to calculate the area and perimeter of various geometric shapes.

Installation

You can install the package using pip:

$ pip install geometool

Methods

The package provides the following functions (yet):

  • calculate_area(shape) : Calculates the area of a given shape. Supported shapes include:
    • Circle(radius)
    • Triangle(3 sides)

Classes

Shape

Abstract base class for geometric shapes.

Circle

  • calc_area() to calculate the area.

Triangle

  • calc_area() to calculate the area
  • is_rightangled() to check if the triangle is right-angled.

Usage

import geometool as g

# Declare a shape object 

s1 = g.Circle(5)
s2 = g.Triangle(6, 8, 9)

# Use calculate_area() to calculate the area of the object 

g.calculate_area(s1)
g.calculate_area(s2)

Authors: Idris Taha

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geometool-0.1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geometool-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file geometool-0.1.1.tar.gz.

File metadata

  • Download URL: geometool-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for geometool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cb75d00497b0e6d8b94b35291e155f0d3f09b94a0f0f80a7793f3ef72308e5ac
MD5 7c965a28f9a20fdca493e295753ee10f
BLAKE2b-256 58ec41ced1b1f1f6c658e3de5f17629c2ea3a4290fd08b74ec6a2c398b4d8227

See more details on using hashes here.

File details

Details for the file geometool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geometool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for geometool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f94ed59018ea34ea00358782a52af95f49e736952d4e1a224b7540dd2c6c6d8
MD5 b1fd7f9d65b17193a37880641854f774
BLAKE2b-256 4755763c190516ca6bf1afd57659559c1105f2a54cfbabbda7cef6c406987124

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page