Recognizes the "height" as the perpendicular distance from the base to the apex of the pyramid
(base_edge, height)
| 21 | |
| 22 | # oracle for Mbpp/581 |
| 23 | def _surface_Area(base_edge, height): |
| 24 | """ |
| 25 | Recognizes the "height" as the perpendicular distance from the base to the apex of the pyramid |
| 26 | """ |
| 27 | slant_height = math.sqrt((base_edge / 2) ** 2 + height**2) |
| 28 | base_area = base_edge**2 |
| 29 | lateral_area = 4 * (base_edge * slant_height) / 2 |
| 30 | total_surface_area = base_area + lateral_area |
| 31 | return round(total_surface_area) |
| 32 | |
| 33 | |
| 34 | # oracle for Mbpp/558 |