Skip to main content

Am I Even Or Odd

PyPI version CI Python versions License: MIT

Is your number even or odd tho?

Yes, n % 2 == 0 does the same thing.

Installation

pip install am-i-even-or-odd

Usage

from am_i_even_or_odd import is_it_even_tho, is_it_odd_tho

print(is_it_even_tho(4))
print(is_it_odd_tho(5))

Output

True
True

Error handling

Only int values are accepted. Anything else — floats, strings, None, booleans — raises a TypeError with a message explaining why, rather than silently returning a possibly-wrong answer:

>>> is_it_even_tho(4.0)
TypeError: expected an int, got 'float' (4.0). Floats and other
numeric types aren't supported to avoid ambiguity around what
counts as 'even' or 'odd'.

Command line

Installing the package also gives you a CLI:

$ am-i-even-or-odd 42
even

$ am-i-even-or-odd 7 --fun
7 is even! Kidding it's obviously ODD.

--fun swaps the plain even/odd output for a random one-liner with a bit more personality. Invalid input (non-integers) prints a usage error and exits with a non-zero status code, so it plays nice in scripts.

Development

git clone https://github.com/KenKambi/am-i-even-or-odd.git
cd am-i-even-or-odd
pip install -e ".[dev]"
pytest -v

Contributions and issues are welcome — see the issue tracker.

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.

Release files for am-i-even-or-odd 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for am-i-even-or-odd 0.3.0
File Size Uploaded
am_i_even_or_odd-0.3.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for am-i-even-or-odd 0.3.0
File Interpreter ABI Platform
am_i_even_or_odd-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / am_i_even_or_odd-0.3.0.tar.gz

Download URL am_i_even_or_odd-0.3.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
4b8ba1e999b99c53df094fd029d85162cbfd6aeb17949d5b2b2cc36356e23b4f
BLAKE2b-256 checksum
How to use checksums
e12ee9d0ecd54a1d3d56ffbc76cb12e9e3b7fa409b9386b1062a61f4e9386e37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release files / am_i_even_or_odd-0.3.0-py3-none-any.whl

Download URL am_i_even_or_odd-0.3.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bcf51ffaa2354e6834a0398462bf50717603f98e2d26b6aaad7f5c33daa1e46
BLAKE2b-256 checksum
How to use checksums
4b6e8711b0c13c9036328d5ebf15fec4fac1b170302d8749eb1d2cfdfaa2373e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page