You can install the package using pip:
pip install isoddevenTo update the package use this command:
pip install --upgrade isoddevenHere'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)) # evenYou 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 evenYou 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
FalseThis project is licensed under the MIT License - see the LICENSE file for details.