```
def ball_speed(L, M, h):
    g = 9.8 # acceleration due to gravity
    I = (1/3) * M * L**2 # moment of inertia
    angular_velocity = (2 * g * h) / L # angular velocity of the axis
    linear_velocity = L * angular_velocity # linear velocity of the ball
    speed = linear_velocity # speed of the ball
    return speed
```
def ball_speed(L, M, h):
    g = 9.8 # acceleration due to gravity
    I = (1/3) * M * L**2 # moment of inertia
    angular_velocity = (2 * g * h) / L # angular velocity of the axis
    linear_velocity = L * angular_velocity # linear velocity of the ball
    speed = linear_velocity # speed of the ball
    return speed