Sure, here's an example Python function to calculate the body mass index (BMI) of a person based on their weight in kilograms and height in meters:

```
def calculate_bmi(weight: float, height: float) -> float:
    """Calculate the body mass index (BMI) of a person given their weight (in kg) and height (in m)."""
    return weight / (height ** 2)
```

You can use this function by calling it with the person's weight and height values, like this:

```
bmi = calculate_bmi(68.0, 1.75)
print(bmi)  # Output: 22.204081632653065
```

This example assumes that the weight is given in kilograms and the height is given in meters, and returns the BMI as a floating-point number. Note that this function does not check for valid inputs or handle errors.
Scrivi una funzione per calcolare l'indice di massa corporea di una persona.