-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Update area.py #2524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update area.py #2524
Conversation
Added Area for Rhombhus
Hey @SabariGanesh-K, TravisCI finished with status TravisBuddy Request Identifier: aace97d0-0338-11eb-8abf-036a378110f7 |
Added rhombhus area. And fixed some gaps error.
Hey @SabariGanesh-K, TravisCI finished with status TravisBuddy Request Identifier: a65e5a80-033a-11eb-8abf-036a378110f7 |
Added Rhombhus area.
I have added a new shape for Area. All checks have been passed :) |
When I type |
maths/area.py
Outdated
@@ -186,6 +186,30 @@ def area_circle(radius: float) -> float: | |||
return pi * radius ** 2 | |||
|
|||
|
|||
def area_rhombhus(base: float, height: float) -> float: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def area_rhombhus(base: float, height: float) -> float: | |
def area_rhombus(base: float, height: float) -> float: |
maths/area.py
Outdated
""" | ||
if base < 0 or height < 0: | ||
raise ValueError("area_rhombhus() only accepts non-negative values") | ||
return 1 / 2 * base * height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably make it take two diagonals as parameters.
Fixed suggested changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your pull request!🤩
* 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
* 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
Added Area for Rhombhus
Describe your change:
Checklist:
Fixes: #{$ISSUE_NO}
.