0 out of 464 challenges solved

Median Length of Trapezium

Write a function `median_trapezium(base1, base2)` that calculates the median length of a trapezium given the lengths of its two parallel sides, `base1` and `base2`. The median of a trapezium is the average of the lengths of its two parallel sides.

#### Function Signature
```python [main.nopy]
def median_trapezium(base1: float, base2: float) -> float:
```

#### Input
- `base1` (float): The length of the first parallel side.
- `base2` (float): The length of the second parallel side.

#### Output
- (float): The median length of the trapezium.

#### Example Usage
```python [main.nopy]
median_trapezium(15, 25)  # Returns 20.0
median_trapezium(10, 20)  # Returns 15.0
median_trapezium(6, 9)    # Returns 7.5
```
def median_trapezium(base1: float, base2: float) -> float:
    """
    Calculate the median length of a trapezium given the lengths of its two parallel sides.

    Args:
    base1 (float): The length of the first parallel side.
    base2 (float): The length of the second parallel side.

    Returns:
    float: The median length of the trapezium.
    """
    # Calculate the median length
    # Replace the following line with your implementation
    pass