Skip to main content

Arnold Package

This Python project provides classes to represent and calculate properties for various geometric shapes: Square, Rectangle, Circle, and Triangle. Each class supports methods to calculate the area and perimeter.

Classes

Square

  • Constructor: Square(length: float)

    • Parameters:
      • length: Length of the square's side (positive integer or float).
  • Methods:

    • area(): Returns the area of the square.
    • perimeter(): Returns the perimeter of the square.

Rectangle

  • Constructor: Rectangle(width: float, height: float)

    • Parameters:
      • width: Width of the rectangle (positive integer or float).
      • height: Height of the rectangle (positive integer or float).
  • Methods:

    • area(): Returns the area of the rectangle.
    • perimeter(): Returns the perimeter of the rectangle.

Circle

  • Constructor: Circle(radius: float)

    • Parameters:
      • radius: Radius of the circle (positive integer or float).
  • Methods:

    • area(): Returns the area of the circle.
    • perimeter(): Returns the circumference of the circle.

Triangle

  • Constructor: Triangle(base: float = None, height: float = None, side1: float = None, side2: float = None, side3: float = None)

    • Parameters:
      • base: Base of the triangle (positive integer or float).
      • height: Height of the triangle (positive integer or float).
      • side1: Length of the first side (positive integer or float).
      • side2: Length of the second side (positive integer or float).
      • side3: Length of the third side (positive integer or float).
  • Methods:

    • area(): Returns the area of the triangle (uses either base and height or all three sides).
    • perimeter(): Returns the perimeter of the triangle.

Usage Example

Here’s a simple example of how to use the classes:

from arnold import Square, Rectangle, Circle, Triangle

# Create a Square object
square = Square(4)
print(f"Square Area: {square.area()}")
print(f"Square Perimeter: {square.perimeter()}")

# Create a Rectangle object
rectangle = Rectangle(3, 5)
print(f"Rectangle Area: {rectangle.area()}")
print(f"Rectangle Perimeter: {rectangle.perimeter()}")

# Create a Circle object
circle = Circle(2)
print(f"Circle Area: {circle.area()}")
print(f"Circle Perimeter: {circle.perimeter()}")

# Create a Triangle object
triangle = Triangle(base=3, height=4, side1=3, side2=4, side3=5)
print(f"Triangle Area: {triangle.area()}")
print(f"Triangle Perimeter: {triangle.perimeter()}")

Metadata

Release files for arnold-bhadauria 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arnold-bhadauria 0.1.0
File Size Uploaded Provenance
arnold_bhadauria-0.1.0.tar.gz 2.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for arnold-bhadauria 0.1.0
File Interpreter ABI Platform
arnold_bhadauria-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 kB

Release files / arnold_bhadauria-0.1.0.tar.gz

Download URL arnold_bhadauria-0.1.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1bb7392bc4fcee795e520ab0c670604b35fc1877d64f46109017a5ac0dc65bb6
BLAKE2b-256 checksum
How to use checksums
b683b9cfa4628538e7c12eb2168a41fee2e64df10256c1978f40b77ad31c2b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Release files / arnold_bhadauria-0.1.0-py3-none-any.whl

Download URL arnold_bhadauria-0.1.0-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
793feb0fda6038b871e9cf3b61286d6c82263f04ac0b7ac884540a75f8001705
BLAKE2b-256 checksum
How to use checksums
68c963beef13eb2268116d1e6a604e4cfc7605f283f9482d01aa5e498aa152da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Security for arnold-bhadauria 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page