Skip to main content

validate_add

No overview available.

def validate_add(
a: number,
b: number
) - > number

Validates that two inputs are numeric and returns their sum. This function ensures type safety before performing addition, raising a TypeError if either input is not an integer or a float.

Parameters

NameTypeDescription
anumberThe first numeric value to be validated and added.
bnumberThe second numeric value to be validated and added.

Returns

TypeDescription
numberThe arithmetic sum of the two provided numeric values.