0 out of 464 challenges solved
Write a Python function to calculate the volume of a triangular prism. The volume of a triangular prism can be calculated using the formula: \[ \text{Volume} = \frac{1}{2} \times \text{Base Area} \times \text{Height} \] Where: - `Base Area` is the area of the triangular base. - `Height` is the perpendicular distance between the two triangular bases. Your function should take three arguments: - `base_length` (float): The length of the base of the triangle. - `base_height` (float): The height of the triangle. - `prism_height` (float): The height of the prism. The function should return the volume of the triangular prism as a float. #### Example Usage ```python [main.nopy] find_volume(10, 8, 6) # Expected output: 240.0 find_volume(3, 2, 2) # Expected output: 6.0 find_volume(1, 2, 1) # Expected output: 1.0 ```
def find_volume(base_length: float, base_height: float, prism_height: float) -> float: """ Calculate the volume of a triangular prism. Args: base_length (float): The length of the base of the triangle. base_height (float): The height of the triangle. prism_height (float): The height of the prism. Returns: float: The volume of the triangular prism. """ # Calculate the volume using the formula # Volume = 0.5 * base_length * base_height * prism_height pass # Replace this with the actual implementation