pccoeacm / all-calc Goto Github PK
View Code? Open in Web Editor NEWA calculator to calculate anything you can think of!
License: MIT License
A calculator to calculate anything you can think of!
License: MIT License
Convert degrees to radians for simplified calculations
Input degrees: 90
1.5714285714285714
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Mean calculator function
Calculating the mean of the numbers provided by the user.
Input: 1, 2, 3
Output: 2
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the geometric and harmonic mean calculator function
To create separate functions for calculating geometric and harmonic mean for a given input of n numbers and displaying required output upto 6 decimal places
For geometric mean:-
Input: Enter number of observations: 5
Enter the numbers:1
2
3
4
5
Output: Geometric mean is : 2.605171
For harmonic mean:-
Input: Enter number of observations: 5
Enter the numbers:1
2
3
4
5
Output: Harmonic mean is : 2.189781
Create a file for the exponent calculator function
The function will input 2 numbers, base, and an exponent and it should return the solution for base ^ exponent
base = 2, exponent = 3, solution = 8
(2^3)
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the slope and slope_intercept calculator function
It should find slope and slope_intercept of given line
x1,y1 = 10,20
x2,y2 = 30,40
slope =1.0
slope_in
tercept = 10.0
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
Create a file for the Cartesian to polar coordinates calculator function
Function will accept two inputs from user "x-coordinate" and "y-coordinate" and it will convert the cartesian coordinates into
polar cordinates. "r" and "Angle" will be the outputs which are the polar coordinates.
x=5
y=10
solution :
r= 11.180339887498949
Angle= 63.43494882292201
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Input -> 0 , Output -> 0.5
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
-Write a function to make a compound interest calculator. In this function, we will have to make a function in which we can add our number of years, amount, and rate at which the compound interest must be calculated.
The function must give the compound interest or the total last value which we will get at the end of the number of years.
amount :- 10000
years :- 5
rate :- 5%
for this question, the program should give the output as
output :-
total interest :- 2762.82
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a Pythagorean Triplet Checker calculator function
The function will take 3 inputs from the user and return true if they are Pythagorean triplets.
Input >> 3, 4, 5
Output >> True
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Modular Multiplicative Inverse calculator function
Given two integers ‘a’ and ‘m’, find modular multiplicative inverse of ‘a’ under modulo ‘m’.
The modular multiplicative inverse is an integer ‘x’ such that.
a x ≡ 1 (mod m)
The value of x should be in {0, 1, 2, … m-1}, i.e., in the range of integer modulo m.
The multiplicative inverse of “a modulo m” exists if and only if a and m are relatively prime (i.e., if gcd(a, m) = 1).
Input: a = 3, m = 11
Output: 4
Since (43) mod 11 = 1, 4 is modulo inverse of 3(under 11).
One might think, 15 also as a valid output as "(153) mod 11"
is also 1, but 15 is not in ring {0, 1, 2, ... 10}, so not
valid.
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Convert the given Decimal number into Binary, Hexadecimal or Octal as per user's choice.
1.Decimal to binary
2.Decimal to Hexadecimal
3.Decimal to Octal
Input:-
Enter your choice: 3
Enter a decimal number: 8
Output:-
Octal conversion is: 10
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Add an option to Exit the Menu
Add a Try Catch for initial input
Input - len(options) + 1
Program Exits
Input - "non integer value"
Output - Enter a Valid Integer
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Reciprocal calculator function
This function will calculate the reciprocal of the given number.
Input> 2
Output>0.5
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Complex number operation calculator function
it should do the required opration of complex number
4+2i + 6-1i = 10+1i
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Area and Perimeter calculator function
Inputs values of dimensions from users and the finds the area and perimeter for the shapes.
l=1 b=2 Area=2 Perimeter=6
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the MapValueToRange calculator function
This function will take a value within a certain range and map it to the value of other range.
2 falls in the middle of 1 and 3, but what will be its value if we change the range to 0 and 1, then it will map to 0.5 in this range.
MapValueToRange(original_value, original_min, original_max, new_min, new_max)
MapValueToRange(2, 1, 3, 0, 1) // Returns 0.5
I would like to work on this function.
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Median of a set of numbers calculator function
The function will find out the median of given set of numbers.
Input>>[4,1,7]
Output>>4
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the LCM calculator function
This function has 2 integer numbers as input and outputs the LCM(Least Common Multiple) of the 2 numbers.
input : a=2 b=3
Output : 6
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
input : 9
output : 34
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Summation calculator function
to calculate sum of square of n first natural no.'s
input=10 i.e n=10
output=385
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Logarithmic function
Take input from user i.e base and a value.
Find log of the value with base taken from user.
If the numer is negative don't find log.
input-
Base- 5
Value- 14
Find logarithm base 5 of 14
Output- 1.6397385131955606
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Can i create Work On it ??
Create a file for the simple interest calculator function
Here, in this function, take the following things :
principle, rate, and time.
then, make a program to calculate the simple interest by using the following formula :
(principle * time * rate)/100
for example
principle :- 10000
rate :- 5%
time :- 5years
then, the output must be = 2500
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the ${Matrix Operations} calculator function
${mat(A)+ mat(B)}
${mat(A)- mat(B)}
${A=[1,1,1], B=[1,1,1], C=A+B=[2,2,2]}
${A=[1,1,1], B=[1,1,1], C=A-B=[0,0,0]}
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the ${Average} calculator function
${The average of given no}
${6+4/2 =5}
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
Create a file for the Determinant calculator function
This function will accept a matrix as an input and return the determinant of it.
Input Matrix
[1 2]
[3 4]
Determinant = -2
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Enter a >>5
Enter b >>6
Polar Coordinates: (7.810249675906654, 0.8760580505981934)
Polar to rectangular: (-2+2.4492935982947064e-16j)
{'inputs': [5.0, 6.0], 'outputs': [(-2+2.4492935982947064e-16j)]}
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
# Todo
Create a file for the Modulo function
The function has 2 input variables, both integers and the function returns a mod b value ( remainder Or modulo when a is divided by b)
input : a=7 b=4
Output : a%b=3
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Todo
Important Points
Create a file for the permutation and combination calculator function
comb( n, k) - will return the no of ways to choose k from n i.e ( n! / (k! * (n – k)!) )
perm(n,k) - will return all permutation of n and k i,e ( n! / (n-k) ! )
comb(4 , 2) = 6
perm(4, 2) = 12
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Primality Test calculator function
This function has 1 integer input and outputs whether prime or not.
By definition a prime number doesn't have any divisors other than 1 and itself. A composite number has at least one additional divisor, let's call it d. Naturally nd is also a divisor of n. It's easy to see, that either d≤n−−√ or nd≤n−−√, therefore one of the divisors d and nd is ≤n−−√. We can use this information to check for primality.
We try to find a non-trivial divisor, by checking if any of the numbers between 2 and n−−√ is a divisor of n. If it is a divisor, than n is definitely not prime, otherwise it is.
Input : 11
Output : true
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Polygon Internal Angle Calculator function
The function will calculate the internal angles for the provided number of sides.
Input >> 5
Output >> 72
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Factorial calculator function
To calculate the factorial of a given integer
input: 5
output: 120
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the 3D Equation Plotter calculator function
It plots any input equation on 3D graph using Plotly Library.
You can check my previous project ,where I have implemented this in JS https://func-3dviz.web.app/
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Finding Factors calculator function
To find factors of given Number
Input:28
Output: 1,2,4,7,28
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
This function has 1 integer numbers as input and outputs is the value of the sine of that number
input:90
output:1
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
input:30
output: sin(30)=0.49999999999999994 , cos(30)=0.8660254037844387, tan(30)=0.5773502691896257
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Root Mean Square calculator function
It will calculate the root mean square of the given list of numbers.
Input > 1 2 3
Output> 2.160
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Input :
Side 1 = 3
Side 2 = 4
Output :
Hypotenuse = 5
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Input: CP = 1500 ; SP = 2000
Output: 500 Profit
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
A requirement of exit function in the program in order to stop the execution as per the requirement of the user.
It would be nice if there was a requirements.txt for users who don't have the necessary dependencies (eg. numpy and others that may be added in the future)
-the user will give two inputs and the function will find out all the factors of the inputs and return the highest common factor of the input
if 8 and 12 are input
factors of 8 are 2,4,8
factors of 12 are 2,4,6,12
so the output will be 4
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Direct Equation Calculator calculator function
The function takes input any mathematical equation as string and takes values of variables and outputs the result of equation
The number of variables can be any
(4*x)^2 + 9*(y^9) - 2*z +3*sin(w) ->(string)
x=2 y=1 z=4 w=90 ->float
Result =68
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the GCD function
This function has 2 integer inputs, and return the GCD(greatest common divisor) of the input numbers using Euclid's Algorithm.
input : a=12, b=48
Output: 12
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Example
a = 4.2
c = 21/5
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Nth power and root calculator function
(x)^n = (x * x * x * x... x * x * x) n times
(x)^(1/n) = Nth root for x
(7)^4 = 7 * 7 * 7 * 7 = 2401
(216)^(1/3) = 6
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the std_deviation calculator function
This function inputs a list and returns the standard deviation
Input: 600, 470, 170, 430, 300
Output: 147.322774886
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
Create a file for the Integration Calculation calculator function
The function can calculate the Integration of Input Equations with limits and values.
Guidelines for adding new functions are clearly mentioned in the contributing guidelines.
Screenshots of the output needs to be added along with the PRs for quicker merges.
If any queries, discuss it in the issue thread.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.