calculate_percentage
Calculate what percentage one number represents of another number. Enter the part and whole values to determine the percentage relationship between them.
Instructions
Calculate what percentage one number is of another number.
Args:
part: The part (the number you want to find the percentage of)
whole: The whole (the total or reference number)
Returns:
The percentage as a number (e.g., 25.0 means 25%)
Raises:
ValueError: If whole is zero
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | Yes | ||
| whole | Yes |
Input Schema (JSON Schema)
{
"properties": {
"part": {
"title": "Part",
"type": "number"
},
"whole": {
"title": "Whole",
"type": "number"
}
},
"required": [
"part",
"whole"
],
"type": "object"
}