Git Product home page Git Product logo

supermath's Introduction

Supermath

This repo consists of one module I have written in python3 to help you cheat on your next math test, called supermath.py.

Mathematical Functions:

average(listOfNums)

returns the average of a list of numbers


mean(listOfNums)

same as average, different name


gcd(a, b)

returns the greatest common denominator of numbers a and b

lcm(a, b)

returns the lowest common multiple of numbers a and b


is_real_number(number)

returns True if number is real


square_root(number)

returns the square root of number



fast_exp(num, pow)

returns num to the pow power using a super efficient algorithm (I hope)



quadratic(a, b, c)

returns x, y coordinates of a quadratic equation given a, b, and c



vol_sphere(r)

returns the volume of a sphere given radius r



permutation_notation(n, r)

returns nPr, P standing for permutation notation



combination_notation(n, r)

returns nCr, C standing for combination notation


divide_remain(dividend, divisor)

returns dividend / divisor with a remainder instead of a decimal


sin(x), cos(x), tan(x), csc(x), sec(x) cot(x)

all return the corresponding trigonmetric function of number x in DEGREES


parabola_equation(xv, yv, xf, yf)

this method returns the equation of a parabola given the x, y coordinates of the vertex and focus.
xv, yv are the x, y coordinates of the vertex
xf, yf are the x, y coordinates of the focus



area_of_polygon_in_circle(sides, radius)

returns the area of a polygon inscribed in a cricle given the number of sides in the polygon and the radius of the circle \



cramers_rule(q, w, e, r, t, y)

returns x, y answers for an algebraic equation, such as: 4x - 5y = 3 and 3x + 2y = -10. The q, w, e, r, t, y values would be 4, -5, 3, 3, 2, -10 and the method would return (-1.9130434782608696, -2.130434782608696), which is the correct x, y, solution for this equation.



stats(list)

returns the mean, median, mode, range, standard deviation, and variance of a list of number values

supermath's People

Contributors

ankith26 avatar bestnest-it avatar noahbroyles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bestnest-it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.