测试评估
| 指标 | 结果 |
|---|---|
| Base 测试 | PASS |
| Plus 测试 | PASS |
| 代码长度 | 553 字符 |
模型生成的代码 (553 字符)
def median_trapezium(base1, base2, height):
"""
Calculate the median length of a trapezium (trapezoid).
The median (or midsegment) connects the midpoints of the non-parallel sides.
Its length is the average of the lengths of the two parallel bases.
Parameters:
base1 (float): Length of the first base.
base2 (float): Length of the second base.
height (float): Height of the trapezium (not used in median calculation).
Returns:
float: The length of the median.
"""
return (base1 + base2) / 2
Base 失败测试用例
- 无失败测试
Plus 失败测试用例
- 无失败测试