Skip to main content

Area Of Figure

Это модуль, который позволяет вычислять площадь различных геометрических фигур, таких как круг и треугольник.

Описание работы

Класс Shape

Этот абстрактный класс определяет метод area(), который должен быть переопределен в дочерних классах.

Класс Circle(Shape)

Дочерний класс, представляющий круг. Имеет метод area(), который вычисляет площадь круга по формуле π * r^2.

Класс Triangle(Shape)

Дочерний класс, представляющий треугольник. Имеет метод area(), который вычисляет площадь треугольника по формуле Герона. Также содержит метод isRect(), который проверяет, является ли треугольник прямоугольным.

Пример использования

Создание объектов круга и треугольника

circle = Circle(5) triangle = Triangle(3, 4, 5)

Вычисление площадей фигур

circle_area = circle.area() triangle_area = triangle.area()

Проверка на прямоугольность треугольника

is_rectangular = triangle.isRect()

print("Площадь круга:", circle_area)

print("Площадь треугольника:", triangle_area)

print("Прямоугольный треугольник?", is_rectangular)

Metadata

Release files for areaoffigure 0.0.1

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

Source distribution (sdist)

Source distribution for areaoffigure 0.0.1
File Size Uploaded Provenance
areaoffigure-0.0.1.tar.gz 2.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for areaoffigure 0.0.1
File Interpreter ABI Platform
areaoffigure-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.9 kB

Release files / areaoffigure-0.0.1.tar.gz

Download URL areaoffigure-0.0.1.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
38be38599a00ef09a8aa72232d761d52c74f3579b9055460155a5a5c7c6cb3b8
BLAKE2b-256 checksum
How to use checksums
d4d228036af25b1348d6b10368e098fe13cb3df65478afc811c7d3a3ac6a5b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Release files / areaoffigure-0.0.1-py3-none-any.whl

Download URL areaoffigure-0.0.1-py3-none-any.whl
Size 1.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0ba475bd5432f9e7c996399ae5388448dcfe3c916f1bc9f3b0578f8cd49646c
BLAKE2b-256 checksum
How to use checksums
9b1dbfed2fc02d8f8be7569da623e5c45dfed3fb121e7e14757e59a3f786e467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.8

Security for areaoffigure 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 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