MCPcopy Index your code
hub / github.com/evalplus/evalplus / _surface_Area

Function _surface_Area

evalplus/eval/_special_oracle.py:23–31  ·  view source on GitHub ↗

Recognizes the "height" as the perpendicular distance from the base to the apex of the pyramid

(base_edge, height)

Source from the content-addressed store, hash-verified

21
22# oracle for Mbpp/581
23def _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

Callers 1

unsafe_executeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected