Skip to main content

Calculate string infix expressions following BEDMAS.

Project description

The Might BEDMAS Calculator v2022.7.26.0

A package to calculate infix expressions following BEDMAS.

Features

This will calculate an expression following thr BEDMAS order of operations and the following operators are supported:

  • Add +
  • Subtract -
  • Multiply *
  • Divide /
  • Power of ^
  • Brakcets ()

Usage via the command line

❯ pip install git+ssh://git@github.com/jdboisvert/mightly-bedmas-calculator

❯ mighty-bedmas-calculator calculate "2+2"
4

❯ mighty-bedmas-calculator calculate "2-3"
-1

❯ mighty-bedmas-calculator calculate "(2+3)^4"
625

Development

Getting started

pip install -r requirements_dev.txt

# set up pre-commit hooks
pre-commit install

Pre-commit

A number of pre-commit hooks are set up to ensure all commits meet basic code quality standards.

If one of the hooks changes a file, you will need to git add that file and re-run git commit before being able to continue.

Testing

pytest is used for testing.

# just the unit tests against your current python version
pytest

# just the unit tests with a matching prefix
pytest -k test_some_function

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

mighty-bedmas-calculator-2022.7.26.0.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file mighty-bedmas-calculator-2022.7.26.0.tar.gz.

File metadata

  • Download URL: mighty-bedmas-calculator-2022.7.26.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.12.0 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for mighty-bedmas-calculator-2022.7.26.0.tar.gz
Algorithm Hash digest
SHA256 714e0cd3be26c19ceb649bc9b25d4c3bc5b5bc680f7632e0881e0b446a28dd9e
MD5 fae2ea00b5730b3db344f14acf111621
BLAKE2b-256 1db9d5036e53276fab0abf62bea5ccde006858b2041a78ff75e1d3886a4c21eb

See more details on using hashes here.

Supported by

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