Skip to main content

Calculate the percentage of a value, or the reverse

Project description

https://travis-ci.org/LordFlashmeow/pycent.svg?branch=master https://img.shields.io/badge/license-MIT-blue.svg

pycent is a simple module to quickly return the percentage of a value, or the reverse.

Installation

pip install pycent

Usage

>>> from pycent import pycent
>>> pycent.percentage(1,2)
0.5
>>> pycent.percentage(5, 19, 3)
26.316
>>> pycent.percent_of(5, 20)
1.0

License

MIT License

Copyright (c) 2017 LordFlashmeow

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

pycent-1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

pycent-1.0-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pycent-1.0.tar.gz.

File metadata

  • Download URL: pycent-1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pycent-1.0.tar.gz
Algorithm Hash digest
SHA256 49198a50c3104e898a50267d2b2c7f7986a5acc60c28be45263ce6c7a7168594
MD5 b93175a2803d53bc5eb7e1314061a10d
BLAKE2b-256 c24eef8cb1e31669eb2a784f7ce47e8e12f1727630728bd66043e0f6f8460292

See more details on using hashes here.

File details

Details for the file pycent-1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pycent-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f364d64f25bc21a1103008ad88571d3bb7b6e747f09efa6f50580c8074eddafd
MD5 e52f5e458a5b3c693d346eede2dd766b
BLAKE2b-256 ad0f6f0892de64ee2f632eec123925fc800147fceb06140d5a6bcfa7262f813d

See more details on using hashes here.

Supported by

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