Commit Graph
17 Commits
Author SHA1 Message Date
kvadrikChristian Clausspre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
a9ddc6168d Update area.py (#14307)
* Update area.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update area.py

Added functions for cone and cylinder lateral surface areas

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor: remove unnecessary empty iterable in deque (RUF037)

Clean up trailing whitespace and empty list in deque initialization to satisfy Ruff linting rules.

* style: update jump_search to use PEP 695 type parameters

Updated the jump_search function signature to use the Python 3.12+ generic type parameter syntax [T]. This resolves the UP047 linting error flagged by Ruff.

* style: update valid_input to use Python 3.12 type parameters

Applied PEP 695 syntax to the valid_input function by moving the 'num' generic into brackets. This resolves the UP047 error in the machine_learning directory.

* fix(types): add Comparable bound to jump_search type parameter

Updated the PEP 695 type parameter syntax to include the 'Comparable' bound. This resolves the Mypy error regarding unsupported left operand types for the '<' operator, ensuring that the generic type T supports comparisons.

* Extra empty space removal

Removed an extra empty line at the end of the file.

* Update area.py

Added a function to calculate the surface area of a regular prism

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update area.py

Corrected line length

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply batched suggestions from code review

Co-authored-by: Christian Clauss <cclauss@me.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-06 00:09:04 +02:00
Jaime Fernández González af131b7c3f Remove duplicated return statement in area_reg_polygon (#14362) 2026-03-10 08:44:09 +03:00
pre-commit-ci[bot]andpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> bc8df6de31 [pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-13 07:52:41 +01:00
Paradactandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 6c15f526e5 Added Torus surface area (#7906)
* Added Torus surface area

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixed error in test

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-01 10:50:50 +13:00
Mislahandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 505c5e20fa Included area of n sided regular polygon (#7438)
* Included area of n sided regular polygon 

Added a function to calculate the area of n sided regular polygons

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* code standard fixes as per PR comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-26 00:26:05 +02:00
Rohan R Bharadwajandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> 467ade28a0 Add surface area of cuboid, conical frustum (#6442)
* Add surface area of cuboid, conical frustum

* add tests for floats, zeroes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-12 20:48:49 +02:00
Christian Claussandgithub-actions 24d3cf8244 The black formatter is no longer beta (#5960)
* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-01-30 20:29:54 +01:00
Rohan R Bharadwaj 615c428903 Add doctest for exception (#5629)
* Add doctest for exception

* Spelling correction
2021-10-27 18:30:03 +02:00
Rohan R Bharadwaj d561de0bd9 Add surface area of cone and cylinder and hemisphere (#5220)
* Update area.py

* Update area.py

* Update area.py

* Update area.py

* Update area.py

* Update area.py

* Update area.py

* Update area.py
2021-10-14 13:23:18 +02:00
SiddhantJain15andDhruv Manilawala dd4b265680 Add function to calculate area of triangle using Heron's formula (#4065)
* Update area.py

Modified area of triangle function. Added a new algorithm to calculate area when 3 sides are known

* Add files via upload

* Update area.py

* Update area.py

* Update area.py

* Update area.py

* Remove unnecessary whitespace

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2020-12-28 13:36:57 +05:30
김수연and201502029 8a134e1f45 update area.py (#3862)
add method "area_ellipse"
- Calculate the area of a ellipse

Co-authored-by: 201502029 <tnehd158@naver.com>
2020-11-18 18:35:51 +08:00
Sabari Ganesh fb9b9ecccf Update area.py (#2524)
* Update area.py

Added Area for Rhombhus

* Update area.py

Added rhombhus area. And fixed some gaps error.

* Update area.py

Added Rhombhus area.

* Update area.py

Fixed suggested changes
2020-10-04 22:20:47 +08:00
Lewis Tian 121dddc7f2 Update maths/area.py (#2501)
the parameters of geometric shapes should be non-negative values
2020-09-28 22:40:47 +08:00
lance-pyles 093a56e3c2 Remove function overhead in area (#2233)
* remove function overhead
add type hints

* remove unused import
2020-07-27 21:29:31 +08:00
lance-pyles b3950035a6 update variable names for consistency using standard formula terms; (#2223)
* update variable names for consistency using standard formula terms;

fix flake8 syntax errors;

fix doctests;

* tweak to variable name
2020-07-23 00:49:34 +02:00
lance-pyles 48df91d48b Add surface area class (#2183)
* add surface area class

* add new line to end of file

* move surface area class into area class

* add missing import

* added pi import

* fix typo

* added blank line

* fixed more import issues

* comment fix

* comment fixes
2020-07-07 00:21:59 +02:00
AdityanagrajandChristian Clauss e6fdcc90fd consists of area of various geometrical shapes (#2002)
* consists of area of various geometrical shapes

In this program it consists of various area calculation of different geometrical shapes such as (square,rectangle) and many other shapes.

* print(f'Rectangle: {area_rectangle(10, 20)=}')

* Update area.py

* Areas of various geometric shapes:

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-18 23:06:19 +02:00