Metadata-Version: 2.4
Name: nithilan
Version: 0.2.0
Summary: Small Python utilities for everyday programs
Author: Nithilan Vivek
Project-URL: Homepage, https://nithi.land
Keywords: utilities,factorial,terminal
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# nithilan

`nithilan` is a small collection of Python utilities for everyday programs.
Requires Python 3.10 or later.

## Installation

```bash
python -m pip install --upgrade nithilan
```

## Usage

```python
import nithilan

print(nithilan.factorial(5))  # 120
print(nithilan.factorial(1.5))  # approximately 1.329340388179137

if nithilan.ask("Continue?"):
    print("Continuing")

nithilan.help()  # Start the interactive usage tutorial (new in 0.2.0).
```

### `factorial(x)`

Returns the factorial of a non-negative integer, or `math.gamma(x + 1)` for
non-negative fractional values supported by the gamma function. Negative values
raise `ValueError`.

### `ask(prompt)`

Asks a yes/no question and returns `True` for `y`, `False` for `n`, and `None`
for any other answer. Answers are case-insensitive. In an interactive Windows,
macOS, or Linux terminal, a single key is read without pressing Enter. The
non-terminal fallback uses line input and requires Enter.

### `help()`

Starts an interactive tutorial covering `factorial`, `ask`, and `help`. Answer
`y` to continue through each step, or `n` to stop. Returns `None`.

## Changes in 0.2.0

- Added `nithilan.help()`, an interactive guide to the library's functions.
