Skip to main content

Math formulas as Python functions

Project description

formula-math

A beginner-friendly Python library that provides common mathematical formulas as functions. No need to memorize formulas — just call the function with your values and get results instantly.

Installation

pip install formula-math

Usage

Import the library with a short alias:

import formula_math as fm

Available Functions

Simple Interest fm.si(principal, rate, time)

  • principal: amount of money (P)
  • rate: annual interest rate in % (R)
  • time: time in years (T) Example: fm.si(1000, 5, 2) # Returns 100.0

Square Perimeter fm.sq_perimeter(side)

  • side: length of square side Example: fm.sq_perimeter(5) # Returns 20

Cube Volume fm.cube_volume(side)

  • side: length of cube side Example: fm.cube_volume(3) # Returns 27

Sphere Volume fm.sphere_volume(radius)

  • radius: radius of sphere Example: fm.sphere_volume(4) # Returns 268.08 (approx)

Cone Volume fm.cone_volume(radius, height)

  • radius: base radius
  • height: height of cone Example: fm.cone_volume(3, 5) # Returns 47.12 (approx)

Rectangle Area fm.rect_area(length, width) Example: fm.rect_area(4, 6) # Returns 24

Circle Circumference fm.circle_circumference(radius) Example: fm.circle_circumference(7) # Returns 43.96 (approx)

Notes

  • All functions return numeric results (float or int as appropriate).
  • Designed to save time in homework, projects, or quick calculations.

License

This project is licensed under the MIT License.

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

formula_math-1.6.7.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

formula_math-1.6.7-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file formula_math-1.6.7.tar.gz.

File metadata

  • Download URL: formula_math-1.6.7.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for formula_math-1.6.7.tar.gz
Algorithm Hash digest
SHA256 f59a27478e82451d01a7a004568f79d108c8e34cf5f2d7abc4f72751249d6a85
MD5 4da41d788acb37157c24c99f980942c6
BLAKE2b-256 cfdec7180a18718f922e5ca08ed78e403750a9411c36ec4fd52d3d47555dea29

See more details on using hashes here.

File details

Details for the file formula_math-1.6.7-py3-none-any.whl.

File metadata

  • Download URL: formula_math-1.6.7-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.13

File hashes

Hashes for formula_math-1.6.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6642f4dddd2bf07527bb9140d56fcb8114f1fee158f6ed894927e84ce09fc6
MD5 8c4f6ba6d29bb4e3d9bd8f8ff19aaded
BLAKE2b-256 0616a5694b459cac992dd400306d7ce7d76194db5274b46390bbc62cc0715562

See more details on using hashes here.

Supported by

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