Template:Parity/doc

Purpose
Returns a string based on the mathematical parity of the number. It calculates whether or not a given number is odd or even.

Usage
Copy and paste the template below:

Examples


An error message is produced if no input value or a non-integral input value is supplied:

TemplateData
{	"params": { "1": {			"label": "Input value", "description": "The number whose parity is to be determined", "example": "0, 1, 2, -46, -57, +6, 6373", "type": "number", "required": true },		"2": {			"label": "Output if even", "description": "Customised output if the input number is even", "default": "even" },		"3": {			"label": "Output if odd", "description": "Customised output if the input number is odd", "default": "odd" }	},	"format": "inline" }