Evaluates mathematical expressions in strings. Also can call WolframAlpha.
Project description
The CalCalc package makes it easy to evaluate mathematical expressions in strings. For example:
from CalCalc import calculate
calculate('mass of the earth in lbs', return_float=True) * calculate("3+4", return_float=True)
9.219e+25
If calculate
cannot evaluate the math expression locally, it will try to evaluate the expression using WolframAlpha.
CalCalc can also be run from the command line. Make sure to use the -s
flag.
$ python CalCalc.py -s '3*(100+8^2)'
330
Using the -w
flag the user can query WolframAlpha
$ python CalCalc.py -w 'mass of the earth in kg'
5.97e+24
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for CalCalc_jcroth-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c244741e6ae9828785a7ee4d630246c2af7f388c23deff76eca43be7f4ff757 |
|
MD5 | 91717db178714e3da5908b039038fcc6 |
|
BLAKE2b-256 | d763ac90aa533cea3d6767a2421f1bdd54866d59f45e25c73ce5e0d4a142a14a |