MCPcopy Create free account
hub / github.com/geekcomputers/Python / check_number

Function check_number

is_number.py:12–18  ·  view source on GitHub ↗

Check if input is a number of any kind or not.

(input_value: Any)

Source from the content-addressed store, hash-verified

10
11
12def check_number(input_value: Any) -> str:
13 """Check if input is a number of any kind or not."""
14
15 if isinstance(input_value, numbers.Number):
16 return f"{input_value} is a number."
17 else:
18 return f"{input_value} is not a number."
19
20
21if __name__ == "__main__":

Callers 1

is_number.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected