batting_average
Calculates a baseball player's batting average by dividing hits by at-bats. Returns the result rounded to the specified precision (default 3 decimal places). (cost: 1 credit)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_hits | No | integer, required, number of hits | |
| precision | No | integer, optional, decimal places to round to, default 3 | |
| num_at_bats | No | integer, required, number of at-bats |