Skip to main content

A Python package to check if a number is odd or even.

Project description

isoddeven

A Python package to check if a number is odd or even.

PyPI - Version Pepy Total Downloads PyPI - License GitHub deployments PyPI - Status

🚀 Installation

You can install the package using pip:

pip install isoddeven

To update the package use this command:

pip install --upgrade isoddeven

📖 Usage

Here's a quick example of how to use it:

from isoddeven import isoddeven

print(isoddeven.isodd(1)) # True
print(isoddeven.isodd(2)) # False
print(isoddeven.iseven(3)) # False
print(isoddeven.iseven(4)) # True
print(isoddeven.state(5)) # odd
print(isoddeven.state(6)) # even

🔷 Run in terminal

You can run it in your terminal by using it's Command Line Interface (CLI) commands:

# Checks if the number is odd or even
isoddeven <number>

# Examples
isoddeven 7
7 is odd

isoddeven 10
10 is even

You can use -o (or --odd) to check if the number is odd, and -e (or --even) to check if it's even. These return True or False.

# Odd Check
isoddeven -o <number>

# Even check
isoddeven -e <number>

# Examples
isoddeven -o 1
True
isoddeven -o 2
False

isoddeven -e 4
True
isoddeven -e 5
False

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isoddeven-1.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isoddeven-1.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file isoddeven-1.1.0.tar.gz.

File metadata

  • Download URL: isoddeven-1.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isoddeven-1.1.0.tar.gz
Algorithm Hash digest
SHA256 2ee8d355c7af5f4451da56df2d07a75c72ebc073125c4ad8fcb1218f6ef25ea8
MD5 843ba2a1e0a3ac90c38e37614edea60b
BLAKE2b-256 6f32af718e4fc6819181578c82ea7dc2d8a0815574adb5eada600ff48a8eb5b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for isoddeven-1.1.0.tar.gz:

Publisher: release.yml on nilaysarma/isoddeven

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isoddeven-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: isoddeven-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for isoddeven-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c3fb85ec5670697b258c44474a2860566f9f79f42dea14c7841d9c716f6aa90
MD5 66d65d84de12783ed432ed55f3683c60
BLAKE2b-256 a6bd8cac198bb6491983f85e48c70af158ebe40a32667274b9a6e4478aa231d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for isoddeven-1.1.0-py3-none-any.whl:

Publisher: release.yml on nilaysarma/isoddeven

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page