https://github.com/fer-aguirre/numerical-expressions
A python command-line tool which describes the change between two numerical values 🧮
https://github.com/fer-aguirre/numerical-expressions
command-line-tool numerical-analysis percentage-calculator python ratio-calculator
Last synced: 6 months ago
JSON representation
A python command-line tool which describes the change between two numerical values 🧮
- Host: GitHub
- URL: https://github.com/fer-aguirre/numerical-expressions
- Owner: fer-aguirre
- License: mit
- Created: 2024-06-18T02:00:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-26T00:24:23.000Z (over 1 year ago)
- Last Synced: 2025-02-15T14:49:58.495Z (8 months ago)
- Topics: command-line-tool, numerical-analysis, percentage-calculator, python, ratio-calculator
- Language: Python
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: change_calculator.py
- License: LICENSE
Awesome Lists containing this project
README
# Numerical Expressions
This project contains a Python script that calculates and describes the change between two numerical values in various ways. The script takes two arguments: an initial value and a final value for comparison. The operations performed include percentage, percentage difference, ratio, and ratio difference.Created by: Fer Aguirre
---
## Directory Structure
```
├── LICENSE
├── change_calculator.py
├── poetry.lock
├── pyproject.toml
└── README.md
```
---## Getting Started
### Requirements
- Python 3.8 or higher
- [argparse](https://pypi.org/project/argparse/)
- [num2words](https://pypi.org/project/num2words/)
- [fraction](https://pypi.org/project/Fraction/)### Installation
To install the necessary dependencies, follow these steps:
1. Clone the repository to your local machine:
```
git clone https://github.com/fer-aguirre/numerical-expressions
```2. Navigate to the project directory:
```
cd numerical-expressions
```3. Install the dependencies using Poetry or pip accordingly:
```
poetry install
``````
pip install -r requirements.txt
```### Running the Script
To run the `change_calculator.py` script from the command line, use the following command:
```
python change_calculator.py
```Replace `` and `` with the values you want to compare. For example:
```
python change_calculator.py 10 20
```This will calculate and print the percentage, percentage difference, ratio, and ratio difference between 10 and 20.
## Contributing
All contributions are welcome. For major changes, please open an issue first to discuss what you would like to change. Pull requests are appreciated to help fix or add features.
## License
This project is released under [MIT License](/LICENSE).
## Acknowledgments
- [Math for Journalists Course](https://www.poynter.org/shop/self-directed-course/numeracy-primer-how-to-write-about-numbers/) by Poynter
- [Newsroom Math Crib Sheet](https://www.datovazurnalistika.cz/wp-content/uploads/2014/07/Newsroom-Math-Crib-Sheet-Steve-Doig.pdf) by Steve Doig---
This repository was generated with [cookiecutter](https://github.com/cookiecutter/cookiecutter).