mode-of-breed-with
[condition] [list of commands]
Parameters:
[condition] |
List of turtle commands |
list of commands that evaluate to true or false |
[list of commands] |
List of turtle commands |
list of commands to that evaluate to a number |
Description:
Returns the mode of the [list of commands] when evaluated across all the turtles of the breed specified by breed
that satisfy the [condition].
Examples:
mode-of-frogs-with [color = red] [speed]
returns the mode of the speed
of all the red turtles of breed frogs.
mode-of-cars-with [brand = honda] [mileage]
returns the mode of the mileage
of all the turtles of breed car with brand honda
.
Notes:
Note: If [list of commands] contains no numbers, an error occurs. If some of the [list of commands], when evaluated, are not numbers, those values are ignored.
Note: When a turtle calls the command, it is not included as part of the calculation.
Related Commands:
average-of-breed-with
max-of-breed-with
median-of-breed-with
min-of-breed-with
mode-of-breed
mode-of-turtles-with
sdev-of-breed-with
sum-of-breed-with
variance-of-breed-with