From 0c342dc37fa684e0594607b61c1297bbfd0073c8 Mon Sep 17 00:00:00 2001 From: Vhizux Date: Fri, 23 Oct 2020 21:38:54 +0200 Subject: [PATCH 01/19] added binomial distribution function --- .vscode/settings.json | 5 +++ mathgenerator/funcs/__init__.py | 1 + mathgenerator/funcs/binomial_distribution.py | 42 ++++++++++++++++++++ test.py | 4 +- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json create mode 100644 mathgenerator/funcs/binomial_distribution.py diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9fadd3a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, + "python.linting.enabled": true +} \ No newline at end of file diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 575dcd2..8bb773a 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -111,3 +111,4 @@ from .decimal_to_bcd import * from .circumference import * from .combine_like_terms import * from .conditional_probability import * +from .binomial_distribution import * diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py new file mode 100644 index 0000000..73ccbe6 --- /dev/null +++ b/mathgenerator/funcs/binomial_distribution.py @@ -0,0 +1,42 @@ +from .__init__ import * + + +def factorial(n): + + if n == 1 or n == 0: + return 1 + else: + return n*factorial(n-1) + + +def newton_symbol(n, k): + return factorial(n)/(factorial(k)*factorial(n-k)) + + +def binomialDistFunc(): + + rejected_fraction = float(random.randint(30, 40)) + random.random() + batch = random.randint(10, 20) + rejections = random.randint(1, 9) + + answer = 0 + + rejected_fraction = round(rejected_fraction, 2) + + problem = "A manufacturer of metal pistons finds that, on average, {0:}% "\ + "of the pistons they manufacture are rejected because " \ + "they are incorrectly sized. What is the probability that a "\ + "batch of {1:} pistons will contain no more than {2:} " \ + "rejected pistons?".format(rejected_fraction, batch, rejections) + + for i in range(0, rejections+1): + answer += newton_symbol(batch, i)*((rejected_fraction/100.)**i) * \ + ((1 - (rejected_fraction/100.))**(batch-i)) + + answer = round(100*answer, 2) + + return problem, answer + + +binomial_distribution = Generator("Binomial distribution", 107, + "P(X Date: Sat, 24 Oct 2020 05:01:47 +0530 Subject: [PATCH 02/19] Added a generator signum function.. --- mathgenerator/funcs/signumFunc.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 mathgenerator/funcs/signumFunc.py diff --git a/mathgenerator/funcs/signumFunc.py b/mathgenerator/funcs/signumFunc.py new file mode 100644 index 0000000..962924c --- /dev/null +++ b/mathgenerator/funcs/signumFunc.py @@ -0,0 +1,25 @@ +import random + + +def signumFunc(min=-999,max=999): + + a = random.randint(min,max) + b = 0 + if (a>0): + b = 1 + if (a<0): + b = -1 + problem = "signum of " + str(a) + " is " + "=" + solution = str(b) + return problem, solution + +signum_function = Generator("signum function", 106, + "signum function of a is ", "b" , + signumFunc) + + + + + + + From 73089e6523ddb2dcecd87af78fae8605b1034b04 Mon Sep 17 00:00:00 2001 From: Gautam Prasad <70034446+Gautampd73@users.noreply.github.com> Date: Sat, 24 Oct 2020 05:06:37 +0530 Subject: [PATCH 03/19] Update __init__.py --- mathgenerator/funcs/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 575dcd2..c49269f 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -111,3 +111,4 @@ from .decimal_to_bcd import * from .circumference import * from .combine_like_terms import * from .conditional_probability import * +from .signum_function import * From db7508ded274a928bc9327e315ef47f8903e78f8 Mon Sep 17 00:00:00 2001 From: Gautam Prasad <70034446+Gautampd73@users.noreply.github.com> Date: Sat, 24 Oct 2020 06:03:44 +0530 Subject: [PATCH 04/19] Update signumFunc.py --- mathgenerator/funcs/signumFunc.py | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/mathgenerator/funcs/signumFunc.py b/mathgenerator/funcs/signumFunc.py index 962924c..64400e0 100644 --- a/mathgenerator/funcs/signumFunc.py +++ b/mathgenerator/funcs/signumFunc.py @@ -1,25 +1,19 @@ +from .__init__ import * import random -def signumFunc(min=-999,max=999): - - a = random.randint(min,max) +def signumFunc(min=-999, max=999): + a = random.randint(min, max) b = 0 - if (a>0): - b = 1 - if (a<0): - b = -1 + if (a > 0): + b = 1 + if (a < 0): + b = -1 problem = "signum of " + str(a) + " is " + "=" solution = str(b) return problem, solution - + + signum_function = Generator("signum function", 106, - "signum function of a is ", "b" , - signumFunc) - - - - - - - + "signum function of a is", "b", + signumFunc) From 5217590f285009bdaadc52cc74448aa93214391c Mon Sep 17 00:00:00 2001 From: Gautam Prasad <70034446+Gautampd73@users.noreply.github.com> Date: Sat, 24 Oct 2020 06:07:40 +0530 Subject: [PATCH 05/19] Delete signumFunc.py --- mathgenerator/funcs/signumFunc.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 mathgenerator/funcs/signumFunc.py diff --git a/mathgenerator/funcs/signumFunc.py b/mathgenerator/funcs/signumFunc.py deleted file mode 100644 index 64400e0..0000000 --- a/mathgenerator/funcs/signumFunc.py +++ /dev/null @@ -1,19 +0,0 @@ -from .__init__ import * -import random - - -def signumFunc(min=-999, max=999): - a = random.randint(min, max) - b = 0 - if (a > 0): - b = 1 - if (a < 0): - b = -1 - problem = "signum of " + str(a) + " is " + "=" - solution = str(b) - return problem, solution - - -signum_function = Generator("signum function", 106, - "signum function of a is", "b", - signumFunc) From 1235b4c424ccc111d271e6d61cc4a64779190bcc Mon Sep 17 00:00:00 2001 From: Gautam Prasad <70034446+Gautampd73@users.noreply.github.com> Date: Sat, 24 Oct 2020 06:08:28 +0530 Subject: [PATCH 06/19] Create signum_function.py --- mathgenerator/funcs/signum_function.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mathgenerator/funcs/signum_function.py diff --git a/mathgenerator/funcs/signum_function.py b/mathgenerator/funcs/signum_function.py new file mode 100644 index 0000000..64400e0 --- /dev/null +++ b/mathgenerator/funcs/signum_function.py @@ -0,0 +1,19 @@ +from .__init__ import * +import random + + +def signumFunc(min=-999, max=999): + a = random.randint(min, max) + b = 0 + if (a > 0): + b = 1 + if (a < 0): + b = -1 + problem = "signum of " + str(a) + " is " + "=" + solution = str(b) + return problem, solution + + +signum_function = Generator("signum function", 106, + "signum function of a is", "b", + signumFunc) From 7502278b4a3c11a0018e71143e5797e0bf9b55dd Mon Sep 17 00:00:00 2001 From: ee17b031-iittp Date: Sun, 25 Oct 2020 16:03:17 +0530 Subject: [PATCH 07/19] "added arc_length" --- README.md | 1 + mathgenerator/funcs/__init__.py | 1 + mathgenerator/funcs/arc_length.py | 14 ++++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 mathgenerator/funcs/arc_length.py diff --git a/README.md b/README.md index 4ed2096..126b7ad 100644 --- a/README.md +++ b/README.md @@ -138,3 +138,4 @@ problem, solution = mathgen.genById(0) | 104 | Circumference | Circumference of circle with radius 60 | 376.99111843077515 | circumference | | 105 | Combine Like terms | 4x^4 + 6x^4 + 9x^1 + 3x^1 + 5x^4 + 10x^3 | 12x^1 + 10x^3 + 15x^4 | combine_like_terms | | 105 | Conditional Probability | Someone tested positive for a nasty disease which only 1.34% of population have. Test sensitivity (true positive) is equal to SN= 98.05% whereas test specificity (true negative) SP= 92.32%. What is the probability that this guy really has that disease? | 14.78% | conditional_probability | +| 106 | Arc Length of an Angle | arc length of an angle with radius = 4.5m and angle = 45 | 3.5357142 | arc_length | \ No newline at end of file diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 575dcd2..331db5f 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -111,3 +111,4 @@ from .decimal_to_bcd import * from .circumference import * from .combine_like_terms import * from .conditional_probability import * +from .arc_length import * \ No newline at end of file diff --git a/mathgenerator/funcs/arc_length.py b/mathgenerator/funcs/arc_length.py new file mode 100644 index 0000000..4e3c536 --- /dev/null +++ b/mathgenerator/funcs/arc_length.py @@ -0,0 +1,14 @@ +from .__init__ import * + + +def arclengthFunc(maxRadius=49, maxAngle=359): + Radius = random.randint(1, maxRadius) + Angle = random.randint(1, maxAngle) + problem = f"Given radius, {Radius} and angle, {Angle}. Find the arc length of the angle." + angle_arc_length = float((Angle / 360) * 2 * math.pi * Radius) + formatted_float = "{:.5f}".format(angle_arc_length) + solution = f"Arc length of the angle = {formatted_float}" + return problem, solution + + +arc_length = Generator("Arc length of Angle", 106, " Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc) \ No newline at end of file From d88198ad12632c4e2ed4b0825201827c1ca8ac09 Mon Sep 17 00:00:00 2001 From: ee17b031-iittp Date: Sun, 25 Oct 2020 16:41:49 +0530 Subject: [PATCH 08/19] "added arc_length" --- README.md | 2 +- mathgenerator/funcs/arc_length.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 126b7ad..d179b37 100644 --- a/README.md +++ b/README.md @@ -138,4 +138,4 @@ problem, solution = mathgen.genById(0) | 104 | Circumference | Circumference of circle with radius 60 | 376.99111843077515 | circumference | | 105 | Combine Like terms | 4x^4 + 6x^4 + 9x^1 + 3x^1 + 5x^4 + 10x^3 | 12x^1 + 10x^3 + 15x^4 | combine_like_terms | | 105 | Conditional Probability | Someone tested positive for a nasty disease which only 1.34% of population have. Test sensitivity (true positive) is equal to SN= 98.05% whereas test specificity (true negative) SP= 92.32%. What is the probability that this guy really has that disease? | 14.78% | conditional_probability | -| 106 | Arc Length of an Angle | arc length of an angle with radius = 4.5m and angle = 45 | 3.5357142 | arc_length | \ No newline at end of file +| 106 | Arc Length of an Angle | arc length of an angle with radius = 4.5m and angle = 45 | 3.5357142 | arc_length | diff --git a/mathgenerator/funcs/arc_length.py b/mathgenerator/funcs/arc_length.py index 4e3c536..3b18b52 100644 --- a/mathgenerator/funcs/arc_length.py +++ b/mathgenerator/funcs/arc_length.py @@ -11,4 +11,4 @@ def arclengthFunc(maxRadius=49, maxAngle=359): return problem, solution -arc_length = Generator("Arc length of Angle", 106, " Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc) \ No newline at end of file +arc_length = Generator("Arc length of Angle", 106, " Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc) From 39e49b282b757e2cdc29612421f8ff8a8ab7bfdb Mon Sep 17 00:00:00 2001 From: ee17b031-iittp Date: Sun, 25 Oct 2020 16:43:53 +0530 Subject: [PATCH 09/19] "added arc_length" --- mathgenerator/funcs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 331db5f..7941dcc 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -111,4 +111,4 @@ from .decimal_to_bcd import * from .circumference import * from .combine_like_terms import * from .conditional_probability import * -from .arc_length import * \ No newline at end of file +from .arc_length import * From 9a5af15486df7c032b67f478c9b39123452c45b2 Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 14:31:37 +0100 Subject: [PATCH 10/19] small improvements --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9fadd3a..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.enabled": true -} \ No newline at end of file From e5efd5f92d88377c12968547f7144fabaf358de4 Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 21:54:58 +0100 Subject: [PATCH 11/19] converted ints to floats --- mathgenerator/funcs/binomial_distribution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index 73ccbe6..31e8a21 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -30,8 +30,8 @@ def binomialDistFunc(): "rejected pistons?".format(rejected_fraction, batch, rejections) for i in range(0, rejections+1): - answer += newton_symbol(batch, i)*((rejected_fraction/100.)**i) * \ - ((1 - (rejected_fraction/100.))**(batch-i)) + answer += newton_symbol(float(batch), float(i))*((rejected_fraction/100.)**float(i)) * \ + ((1 - (rejected_fraction/100.))**(float(batch)-float(i))) answer = round(100*answer, 2) From 36fbf848393e2a2ce8cca78685c662a91745beb9 Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 21:58:31 +0100 Subject: [PATCH 12/19] lint fix --- mathgenerator/funcs/binomial_distribution.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index 31e8a21..b47830a 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -29,11 +29,11 @@ def binomialDistFunc(): "batch of {1:} pistons will contain no more than {2:} " \ "rejected pistons?".format(rejected_fraction, batch, rejections) - for i in range(0, rejections+1): - answer += newton_symbol(float(batch), float(i))*((rejected_fraction/100.)**float(i)) * \ - ((1 - (rejected_fraction/100.))**(float(batch)-float(i))) + for i in range(0, rejections + 1): + answer += newton_symbol(float(batch), float(i)) * ((rejected_fraction / 100.) ** float(i)) * \ + ((1 - (rejected_fraction/100.)) ** (float(batch)-float(i))) - answer = round(100*answer, 2) + answer = round(100 * answer, 2) return problem, answer From 226f6bb36dcd751874ff8aa356672a57e1744daa Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 21:59:08 +0100 Subject: [PATCH 13/19] lint fix --- mathgenerator/funcs/binomial_distribution.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index b47830a..8fc5f95 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -6,11 +6,11 @@ def factorial(n): if n == 1 or n == 0: return 1 else: - return n*factorial(n-1) + return n * factorial(n-1) def newton_symbol(n, k): - return factorial(n)/(factorial(k)*factorial(n-k)) + return factorial(n) / (factorial(k) * factorial(n-k)) def binomialDistFunc(): From 6079b20c2988f208af27c18886d76ac82017e15b Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 22:03:12 +0100 Subject: [PATCH 14/19] lint fix --- .vscode/settings.json | 5 +++++ mathgenerator/funcs/binomial_distribution.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9fadd3a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": true, + "python.linting.enabled": true +} \ No newline at end of file diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index 8fc5f95..5a4e404 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -6,11 +6,11 @@ def factorial(n): if n == 1 or n == 0: return 1 else: - return n * factorial(n-1) + return n * factorial(n - 1) def newton_symbol(n, k): - return factorial(n) / (factorial(k) * factorial(n-k)) + return factorial(n) / (factorial(k) * factorial(n - k)) def binomialDistFunc(): @@ -31,12 +31,12 @@ def binomialDistFunc(): for i in range(0, rejections + 1): answer += newton_symbol(float(batch), float(i)) * ((rejected_fraction / 100.) ** float(i)) * \ - ((1 - (rejected_fraction/100.)) ** (float(batch)-float(i))) + ((1 - (rejected_fraction / 100.)) ** (float(batch) - float(i))) answer = round(100 * answer, 2) return problem, answer -binomial_distribution = Generator("Binomial distribution", 107, +binomial_distribution = Generator("Binomial distribution", 107, "P(X Date: Sun, 25 Oct 2020 22:03:24 +0100 Subject: [PATCH 15/19] lint fix --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9fadd3a..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "python.linting.pylintEnabled": false, - "python.linting.flake8Enabled": true, - "python.linting.enabled": true -} \ No newline at end of file From 1ed0897310b396a67ee2abc4d0416a3b675bec39 Mon Sep 17 00:00:00 2001 From: Vhizux Date: Sun, 25 Oct 2020 22:06:40 +0100 Subject: [PATCH 16/19] lint fix --- mathgenerator/funcs/binomial_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index 5a4e404..03166e3 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -31,7 +31,7 @@ def binomialDistFunc(): for i in range(0, rejections + 1): answer += newton_symbol(float(batch), float(i)) * ((rejected_fraction / 100.) ** float(i)) * \ - ((1 - (rejected_fraction / 100.)) ** (float(batch) - float(i))) + ((1 - (rejected_fraction / 100.)) ** (float(batch) - float(i))) answer = round(100 * answer, 2) From 2a8d666bc35e26d1cff4c71e774dc463d49c1492 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Mon, 26 Oct 2020 13:13:22 -0400 Subject: [PATCH 17/19] id fix --- README.md | 215 +++++++++--------- mathgenerator/funcs/__init__.py | 2 +- .../funcs/conditional_probability.py | 2 +- test.py | 7 +- 4 files changed, 114 insertions(+), 112 deletions(-) diff --git a/README.md b/README.md index 4ed2096..5d7b0e2 100644 --- a/README.md +++ b/README.md @@ -31,110 +31,111 @@ problem, solution = mathgen.genById(0) | Id | Skill | Example problem | Example Solution | Function Name | |------|-----------------------------------|--------------------|-----------------------|--------------------------| [//]: # list start -| 0 | Addition | 32+29= | 61 | addition | -| 1 | Subtraction | 45-12= | 33 | subtraction | -| 2 | Multiplication | 25*3= | 75 | multiplication | -| 3 | Division | 32/95= | 0.3368421052631579 | division | -| 4 | Binary Complement 1s | 11= | 00 | binary_complement_1s | -| 5 | Modulo Division | 22%45= | 22 | modulo_division | -| 6 | Square Root | sqrt(144)= | 12 | square_root | -| 7 | Power Rule Differentiation | 3x^1 | 3x^0 | power_rule_differentiation | -| 8 | Square | 2^2= | 4 | square | -| 9 | LCM (Least Common Multiple) | LCM of 5 and 18 = | 90 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 16 and 16 = | 16 | gcd | -| 11 | Basic Algebra | 8x + 2 = 5 | 3/8 | basic_algebra | -| 12 | Logarithm | log2(128) | 7 | log | -| 13 | Easy Division | 525/25 = | 21 | int_division | -| 14 | Decimal to Binary | Binary of 39= | 100111 | decimal_to_binary | -| 15 | Binary to Decimal | 01110 | 14 | binary_to_decimal | -| 16 | Fraction Division | (9/4)/(8/4) | 9/8 | divide_fractions | -| 17 | Integer Multiplication with 2x2 Matrix | 7 * [[3, 3], [9, 2]] = | [[21,21],[63,14]] | multiply_int_to_22_matrix | -| 18 | Area of Triangle | Area of triangle with side lengths: 18 7 5 = | (3.67394039744206e-15+60j) | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 31, 49 and 15 exist? | No | valid_triangle | -| 20 | Midpoint of the two point | (7,-13),(-11,-20)= | (-2.0,-16.5) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+15x+56 | (x+7)(x+8) | factoring | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 68 and 72 = | 40 | third_angle_of_triangle | -| 23 | Solve a System of Equations in R^2 | -x - 8y = 57, -7x - 7y = 56 | x = -1, y = -7 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (-18, -4) and (20, -1) | sqrt(1453) | distance_two_points | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 14 and 16 = | 21.26 | pythagorean_theorem | -| 26 | Linear Equations | -8x + 9y = -159, 4x + -7y = 97 | x = 12, y = -7 | linear_equations | -| 27 | Prime Factorisation | Find prime factors of 22 | [2, 11] | prime_factors | -| 28 | Fraction Multiplication | (5/9)*(3/8) | 5/24 | fraction_multiplication | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 20 sides | 162.0 | angle_regular_polygon | -| 30 | Combinations of Objects | Number of combinations from 20 objects picked 0 at a time | 1 | combinations | -| 31 | Factorial | 4! = | 24 | factorial | -| 32 | Surface Area of Cube | Surface area of cube with side = 13m is | 1014 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 4m, 3m, 10m is | 164 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 30m and radius = 3m is | 622 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 3m is | 27 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 18m, 4m, 20m is | 1440 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 8m and radius = 2m is | 100 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 9m and radius = 18m is | 2155 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 8m and radius = 12m is | 1206 m^3 | volume_cone | -| 40 | Common Factors | Common Factors of 94 and 86 = | [1, 2] | common_factors | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 0/2x - 2 and y = 10/3x - 4 | (3/5, -2) | intersection_of_two_lines | -| 42 | Permutations | Number of Permutations from 11 objects picked 4 at a time = | 7920 | permutation | -| 43 | Cross Product of 2 Vectors | [-19, -10, -19] X [-8, -15, 19] = | [-475, 513, 205] | vector_cross | -| 44 | Compare Fractions | Which symbol represents the comparison between 8/5 and 4/5? | > | compare_fractions | -| 45 | Simple Interest | Simple interest for a principle amount of 1700 dollars, 9% rate of interest and for a time period of 2 years is = | 306.0 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
7-8
-2-2
5-9
7-8
and
-10-22
3-48
|
-9418-50
1412-20
-7726-62
-9418-50
| matrix_multiplication | -| 47 | Cube Root | cuberoot of 273 upto 2 decimal places is: | 6.49 | cube_root | -| 48 | Power Rule Integration | 3x^5 + 10x^6 + 2x^7 + 2x^9 | (3/5)x^6 + (10/6)x^7 + (2/7)x^8 + (2/9)x^10 + c | power_rule_integration | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 29 , 193, 28 = | 110 | fourth_angle_of_quadrilateral | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 51x^2+196x+10=0 | [-0.05, -3.79] | quadratic_equation | -| 51 | HCF (Highest Common Factor) | HCF of 1 and 13 = | 1 | hcf | -| 52 | Probability of a certain sum appearing on faces of dice | If 2 dice are rolled at the same time, the probability of getting a sum of 7 = | 6/36 | dice_sum_probability | -| 53 | Exponentiation | 14^5 = | 537824 | exponentiation | -| 54 | Confidence interval For sample S | The confidence interval for sample [286, 254, 294, 290, 235, 252, 297, 262, 238, 281, 248, 275, 282, 293, 232, 233, 288, 236, 250, 242, 241, 261] with 90% confidence is | (270.2008805103011, 254.34457403515344) | confidence_interval | -| 55 | Comparing surds | Fill in the blanks 59^(1/5) _ 34^(1/7) | > | surds_comparison | -| 56 | Fibonacci Series | The Fibonacci Series of the first 14 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233] | fibonacci_series | -| 57 | Trigonometric Values | What is sin(60)? | √3/2 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 6 sides = | 720 | sum_of_polygon_angles | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[46, 12, 41, 13, 40, 14, 21, 24, 5, 43, 34, 19, 9, 18, 39] | The Mean is 25.2 , Standard Deviation is 180.96000000000004, Variance is 13.452137376640191 | data_summary | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 11m is | 1520.5308443374597 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 54 m = | 659583.6608064842 m^3 | volume_sphere | -| 62 | nth Fibonacci number | What is the 21th Fibonacci number? | 10946 | nth_fibonacci_number | -| 63 | Profit or Loss Percent | Loss percent when CP = 294 and SP = 163 is: | 44.5578231292517 | profit_loss_percent | -| 64 | Binary to Hexidecimal | 010111 | 0x17 | binary_to_hex | -| 65 | Multiplication of 2 complex numbers | (-15+4j) * (3-8j) = | (-13+132j) | multiply_complex_numbers | -| 66 | Geometric Progression | For the given GP [8, 80, 800, 8000, 80000, 800000] ,Find the value of a,common ratio,11th term value, sum upto 8th term | The value of a is 8, common ratio is 10 , 11th term is 80000000000 , sum upto 8th term is 88888888.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 89 , 18 and 50 = | (89*18*50)^(1/3) = 43.10663994756918 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 13 , 30 and 40 = | 3/((1/13) + (1/30) + (1/40)) = 22.18009478672986 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[190.83139432733142, 156.23278912186944] is: | 246.62786837199073 | euclidian_norm | -| 70 | Angle between 2 vectors | angle between the vectors [424.56, 424.72, 189.19, 78.27, 930.38, 707.61, 196.98, 629.23, 637.74, 251.83, 563.31, 309.15, 811.91, 214.04, 20.86, 802.15, 948.67] and [645.19, 932.88, 213.39, 818.73, 24.01, 671.44, 845.54, 599.61, 791.14, 497.84, 67.99, 29.82, 499.55, 391.4, 546.58, 881.0, 953.93] is: | 0.7 radians | angle_btw_vectors | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -93 and 0 = | 93 | absolute_difference | -| 72 | Dot Product of 2 Vectors | [12, -15, -11] . [11, -18, -17] = | 589 | vector_dot | -| 73 | Binary 2's Complement | 2's complement of 1111 = | 1 | binary_2s_complement | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[2, 17, 3], [31, 0, 5], [37, 67, 73]]) is: | Matrix([[67/5953, 208/5953, -17/5953], [2078/29765, -7/5953, -83/29765], [-2077/29765, -99/5953, 527/29765]]) | invert_matrix | -| 75 | Area of a Sector | Given radius, 42 and angle, 224. Find the area of the sector. | Area of sector = 3448.21210 | sector_area | -| 76 | Mean and Median | Given the series of numbers [1, 14, 41, 75, 22, 95, 21, 80, 24, 19]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 39.2 and Arithmetic median of this series is 23.0 | mean_median | -| 77 | Determinant to 2x2 Matrix | Det([[53, 75], [30, 7]]) = | -1879 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 8512 dollars, 10% rate of interest and for a time period of 8 year is = | 18246.23 | compound_interest | -| 79 | Decimal to Hexadecimal | Binary of 172= | 0xac | decimal_to_hexadeci | -| 80 | Percentage of a number | What is 73% of 19? | Required percentage = 13.87% | percentage | -| 81 | Celsius To Fahrenheit | Convert 81 degrees Celsius to degrees Fahrenheit = | 177.8 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 53 of the AP series: 75, -14, -103 ... | -4553 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 5 terms of the AP series: -77, -14, 49 ... | 245.0 | arithmetic_progression_sum | -| 84 | Converts decimal to octal | The decimal number 1 in Octal is: | 0o1 | decimal_to_octal | -| 85 | Converts decimal to Roman Numerals | The number 2667 in Roman Numerals is: | MMDCLXVII | decimal_to_roman_numerals | -| 86 | Degrees to Radians | Angle 217 in radians is = | 3.79 | degree_to_rad | -| 87 | Radians to Degrees | Angle 1 in degrees is = | 57.3 | radian_to_deg | -| 88 | Differentiation | differentiate w.r.t x : d(exp(x)+7*x^3)/dx | 21*x^2 + exp(x) | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 61x^2 + 82x + 10 is = | 71.3333 | definite_integral | -| 90 | isprime | 86 | False | is_prime | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 4 is = | 18310 | bcd_to_decimal | -| 92 | Complex To Polar Form | rexp(itheta) = | 24.04exp(i-0.79) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={9, 10, 3, 4} ,b={1, 3, 9}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 3, 4, 9, 10},Intersection is {9, 3}, a-b is {10, 4},b-a is {1}, Symmetric difference is {1, 4, 10} | set_operation | -| 94 | Base Conversion | Convert 30246 from base 9 to base 10. | 19887 | base_conversion | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 5 and height, 87? | CSA of cylinder = 2733.19 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 11 sided polygon with lengths of [28, 13, 90, 99, 27, 61, 7, 7, 68, 80, 28]cm is: | 508 | perimeter_of_polygons | -| 97 | Power of Powers | The 17^4^2 = 17^(4*2) = 17^8 | 6975757441 | power_of_powers | -| 98 | Quotient of Powers with Same Base | The Quotient of 50^10 and 50^7 = 50^(10-7) = 50^3 | 125000 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 7^1 and 40^1 = (7/40)^1 = 0.175^1 | 0.175 | quotient_of_power_same_power | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 3x^2 + 9x + 1 = 0 | simplified solution : ((-0.116, -2.884)), generalized solution : ((-9 + sqrt(69))/2*3, (-9 - sqrt(69))/2*3) | complex_quadratic | -| 101 | Leap Year or Not | Year 2078 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 562 minutes to Hours & Minutes | 9 hours and 22 minutes | minutes_to_hours | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 5293 is = | 141013 | decimal_to_bcd | -| 104 | Circumference | Circumference of circle with radius 60 | 376.99111843077515 | circumference | -| 105 | Combine Like terms | 4x^4 + 6x^4 + 9x^1 + 3x^1 + 5x^4 + 10x^3 | 12x^1 + 10x^3 + 15x^4 | combine_like_terms | -| 105 | Conditional Probability | Someone tested positive for a nasty disease which only 1.34% of population have. Test sensitivity (true positive) is equal to SN= 98.05% whereas test specificity (true negative) SP= 92.32%. What is the probability that this guy really has that disease? | 14.78% | conditional_probability | +| 0 | Addition | 46+4= | 50 | addition | +| 1 | Subtraction | 63-13= | 50 | subtraction | +| 2 | Multiplication | 25*0= | 0 | multiplication | +| 3 | Division | 66/99= | 0.6666666666666666 | division | +| 4 | Binary Complement 1s | 011101111= | 100010000 | binary_complement_1s | +| 5 | Modulo Division | 50%72= | 50 | modulo_division | +| 6 | Square Root | sqrt(9)= | 3 | square_root | +| 7 | Power Rule Differentiation | 5x^8 + 8x^1 + 5x^2 + 7x^9 + 9x^6 | 40x^7 + 8x^0 + 10x^1 + 63x^8 + 54x^5 | power_rule_differentiation | +| 8 | Square | 12^2= | 144 | square | +| 9 | LCM (Least Common Multiple) | LCM of 14 and 12 = | 84 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 9 and 20 = | 1 | gcd | +| 11 | Basic Algebra | 9x + 7 = 10 | 1/3 | basic_algebra | +| 12 | Logarithm | log2(16) | 4 | log | +| 13 | Easy Division | 120/24 = | 5 | int_division | +| 14 | Decimal to Binary | Binary of 27= | 11011 | decimal_to_binary | +| 15 | Binary to Decimal | 1101100000 | 864 | binary_to_decimal | +| 16 | Fraction Division | (2/10)/(10/8) | 4/25 | divide_fractions | +| 17 | Integer Multiplication with 2x2 Matrix | 16 * [[1, 1], [5, 0]] = | [[16,16],[80,0]] | multiply_int_to_22_matrix | +| 18 | Area of Triangle | Area of triangle with side lengths: 18 11 18 = | 94.26525075551436 | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 10, 26 and 25 exist? | Yes | valid_triangle | +| 20 | Midpoint of the two point | (9,-6),(-9,-18)= | (0.0,-12.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+3x+2 | (x+1)(x+2) | factoring | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 18 and 24 = | 138 | third_angle_of_triangle | +| 23 | Solve a System of Equations in R^2 | -8x + 5y = 33, 7x - 3y = -33 | x = -6, y = -3 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (-3, -18) and (6, -17) | sqrt(82) | distance_two_points | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 19 and 3 = | 19.24 | pythagorean_theorem | +| 26 | Linear Equations | -6x + -19y = 42, -20x + -14y = 140 | x = -7, y = 0 | linear_equations | +| 27 | Prime Factorisation | Find prime factors of 193 | [193] | prime_factors | +| 28 | Fraction Multiplication | (5/4)*(7/10) | 7/8 | fraction_multiplication | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 11 sides | 147.27 | angle_regular_polygon | +| 30 | Combinations of Objects | Number of combinations from 17 objects picked 3 at a time | 680 | combinations | +| 31 | Factorial | 2! = | 2 | factorial | +| 32 | Surface Area of Cube | Surface area of cube with side = 16m is | 1536 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 1m, 2m, 7m is | 46 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 37m and radius = 11m is | 3317 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 5m is | 125 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 2m, 20m, 8m is | 320 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 25m and radius = 5m is | 1963 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 14m and radius = 4m is | 233 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 33m and radius = 17m is | 9987 m^3 | volume_cone | +| 40 | Common Factors | Common Factors of 29 and 41 = | [1] | common_factors | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -2/2x + 3 and y = -10/2x - 1 | (-1, 4) | intersection_of_two_lines | +| 42 | Permutations | Number of Permutations from 18 objects picked 9 at a time = | 17643225600 | permutation | +| 43 | Cross Product of 2 Vectors | [-3, 6, -11] X [15, -16, 15] = | [-86, -120, -42] | vector_cross | +| 44 | Compare Fractions | Which symbol represents the comparison between 4/8 and 9/7? | < | compare_fractions | +| 45 | Simple Interest | Simple interest for a principle amount of 9046 dollars, 1% rate of interest and for a time period of 9 years is = | 814.14 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
11-1
-194
-103-8
and
6-46
075
27-8
|
4-419
2957
-76519
| matrix_multiplication | +| 47 | Cube Root | cuberoot of 335 upto 2 decimal places is: | 6.95 | cube_root | +| 48 | Power Rule Integration | 1x^5 + 3x^1 | (1/5)x^6 + (3/1)x^2 + c | power_rule_integration | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 64 , 57, 213 = | 26 | fourth_angle_of_quadrilateral | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 96x^2+191x+81=0 | [-0.61, -1.38] | quadratic_equation | +| 51 | HCF (Highest Common Factor) | HCF of 15 and 12 = | 3 | hcf | +| 52 | Probability of a certain sum appearing on faces of dice | If 1 dice are rolled at the same time, the probability of getting a sum of 2 = | 1/6 | dice_sum_probability | +| 53 | Exponentiation | 11^4 = | 14641 | exponentiation | +| 54 | Confidence interval For sample S | The confidence interval for sample [236, 288, 281, 252, 250, 254, 263, 228, 248, 245, 214, 221, 247, 235, 220, 286, 292, 242, 268, 215, 243, 283, 282, 212] with 99% confidence is | (263.2888975746178, 237.12776909204885) | confidence_interval | +| 55 | Comparing surds | Fill in the blanks 13^(1/4) _ 35^(1/1) | < | surds_comparison | +| 56 | Fibonacci Series | The Fibonacci Series of the first 5 numbers is ? | [0, 1, 1, 2, 3] | fibonacci_series | +| 57 | Trigonometric Values | What is cos(30)? | √3/2 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 9 sides = | 1260 | sum_of_polygon_angles | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[45, 17, 14, 27, 12, 11, 13, 38, 14, 48, 38, 48, 30, 41, 36] | The Mean is 28.8 , Standard Deviation is 186.69333333333333, Variance is 13.663576886501328 | data_summary | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 2m is | 50.26548245743669 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 95 m = | 3591364.0018287315 m^3 | volume_sphere | +| 62 | nth Fibonacci number | What is the 37th Fibonacci number? | 24157817 | nth_fibonacci_number | +| 63 | Profit or Loss Percent | Profit percent when CP = 169 and SP = 360 is: | 113.01775147928994 | profit_loss_percent | +| 64 | Binary to Hexidecimal | 100010 | 0x22 | binary_to_hex | +| 65 | Multiplication of 2 complex numbers | (12+17j) * (11-3j) = | (183+151j) | multiply_complex_numbers | +| 66 | Geometric Progression | For the given GP [10, 60, 360, 2160, 12960, 77760] ,Find the value of a,common ratio,11th term value, sum upto 7th term | The value of a is 10, common ratio is 6 , 11th term is 604661760 , sum upto 7th term is 559870.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 16 , 99 , 82 , 40 = | (16*99*82*40)^(1/4) = 47.742730688054316 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 64 , 21 , 60 , 61 = | 4/((1/64) + (1/21) + (1/60) + (1/61)) = 41.53507105403146 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[508.56178681813515, 829.8393085389811, 141.9778436425696, 157.79854813315953, 936.4111703191011, 60.03432095552797, 309.1650693726604, 532.5680163890804, 249.7649337521495, 693.033334449361, 726.1934281438319, 824.6613026949497, 40.71867012843633] is: | 2000.941549572921 | euclidian_norm | +| 70 | Angle between 2 vectors | angle between the vectors [108.86, 442.35, 675.26, 315.79, 885.28, 45.3, 892.33, 447.4] and [987.81, 887.54, 199.52, 477.21, 587.71, 963.72, 615.65, 226.26] is: | 0.87 radians | angle_btw_vectors | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -55 and 41 = | 96 | absolute_difference | +| 72 | Dot Product of 2 Vectors | [19, -17, -13] . [-16, 11, 5] = | -556 | vector_dot | +| 73 | Binary 2's Complement | 2's complement of 100 = | 100 | binary_2s_complement | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[65, 2, 89], [51, 73, 27], [48, 19, 39]]) is: | Matrix([[-778/25097, -1613/75291, 6443/75291], [231/25097, 579/25097, -928/25097], [845/25097, 1139/75291, -4643/75291]]) | invert_matrix | +| 75 | Area of a Sector | Given radius, 15 and angle, 33. Find the area of the sector. | Area of sector = 64.79535 | sector_area | +| 76 | Mean and Median | Given the series of numbers [68, 8, 77, 86, 93, 66, 6, 65, 41, 26]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 53.6 and Arithmetic median of this series is 65.5 | mean_median | +| 77 | Determinant to 2x2 Matrix | Det([[32, 3], [36, 4]]) = | 20 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 7744 dollars, 10% rate of interest and for a time period of 2 year is = | 9370.24 | compound_interest | +| 79 | Decimal to Hexadecimal | Binary of 803= | 0x323 | decimal_to_hexadeci | +| 80 | Percentage of a number | What is 24% of 7? | Required percentage = 1.68% | percentage | +| 81 | Celsius To Fahrenheit | Convert 50 degrees Celsius to degrees Fahrenheit = | 122.0 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 38 of the AP series: 37, -6, -49 ... | -1554 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 50 terms of the AP series: -23, 65, 153 ... | 106650.0 | arithmetic_progression_sum | +| 84 | Converts decimal to octal | The decimal number 1900 in Octal is: | 0o3554 | decimal_to_octal | +| 85 | Converts decimal to Roman Numerals | The number 2656 in Roman Numerals is: | MMDCLVI | decimal_to_roman_numerals | +| 86 | Degrees to Radians | Angle 184 in radians is = | 3.21 | degree_to_rad | +| 87 | Radians to Degrees | Angle 0 in degrees is = | 0.0 | radian_to_deg | +| 88 | Differentiation | differentiate w.r.t x : d(tan(x)+9*x^4)/dx | 36*x^3 + tan(x)^2 + 1 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 93x^2 + 7x + 75 is = | 109.5 | definite_integral | +| 90 | isprime | 96 | False | is_prime | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 29973 | bcd_to_decimal | +| 92 | Complex To Polar Form | rexp(itheta) = | 15.65exp(i0.46) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 10, 3, 7} ,b={2, 4, 7, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {2, 3, 4, 7, 8, 9, 10},Intersection is {10, 7}, a-b is {8, 3},b-a is {9, 2, 4}, Symmetric difference is {2, 3, 4, 8, 9} | set_operation | +| 94 | Base Conversion | Convert 3540 from base 10 to base 14. | 140C | base_conversion | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 48 and height, 64? | CSA of cylinder = 19301.95 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 3 sided polygon with lengths of [23, 3, 55]cm is: | 81 | perimeter_of_polygons | +| 97 | Power of Powers | The 9^5^2 = 9^(5*2) = 9^10 | 3486784401 | power_of_powers | +| 98 | Quotient of Powers with Same Base | The Quotient of 40^3 and 40^5 = 40^(3-5) = 40^-2 | 0.000625 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 49^1 and 19^1 = (49/19)^1 = 2.5789473684210527^1 | 2.5789473684210527 | quotient_of_power_same_power | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 6x^2 + 8x + 1 = 0 | simplified solution : ((-0.14, -1.194)), generalized solution : ((-8 + sqrt(40))/2*6, (-8 - sqrt(40))/2*6) | complex_quadratic | +| 101 | Leap Year or Not | Year 2064 | is a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 442 minutes to Hours & Minutes | 7 hours and 22 minutes | minutes_to_hours | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 5507 is = | 1583 | decimal_to_bcd | +| 104 | Circumference | Circumference of circle with radius 94 | 590.6194188748811 | circumference | +| 105 | Combine Like terms | 9x^4 + 3x^6 + 9x^1 + 2x^2 + 1x^5 + 2x^3 + 6x^3 + 4x^1 | 13x^1 + 2x^2 + 8x^3 + 9x^4 + 1x^5 + 3x^6 | combine_like_terms | +| 106 | signum function | signum of 697 is = | 1 | signum_function | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.51% of population have. Test sensitivity (true positive) is equal to SN= 94.60% whereas test specificity (true negative) SP= 93.00%. What is the probability that this guy really has that disease? | 17.16% | conditional_probability | diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index c49269f..582f308 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -110,5 +110,5 @@ from .minutes_to_hours import * from .decimal_to_bcd import * from .circumference import * from .combine_like_terms import * -from .conditional_probability import * from .signum_function import * +from .conditional_probability import * diff --git a/mathgenerator/funcs/conditional_probability.py b/mathgenerator/funcs/conditional_probability.py index bf171e6..a13e3b1 100644 --- a/mathgenerator/funcs/conditional_probability.py +++ b/mathgenerator/funcs/conditional_probability.py @@ -24,4 +24,4 @@ def conditionalProbFunc(): conditional_probability = Generator("Conditional Probability", - 105, "P(A|+)=", "c", conditionalProbFunc) + 107, "P(A|+)=", "c", conditionalProbFunc) diff --git a/test.py b/test.py index 3b54dc2..bc610af 100644 --- a/test.py +++ b/test.py @@ -5,9 +5,10 @@ from mathgenerator import mathgen # print(mathgen.addition()) # prints each generator in genList -# list = mathgen.getGenList() -# for item in list: -# print(item[2]) +list = mathgen.getGenList() +for item in list: + print(item[2]) # print(mathgen.getGenList()) print(mathgen.circumference()) +print(mathgen.genById(106)) From 55a9358929561d280e23cbc3324d910d07da1052 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Mon, 26 Oct 2020 13:17:47 -0400 Subject: [PATCH 18/19] arc length id fix --- README.md | 217 +++++++++++++++--------------- mathgenerator/funcs/arc_length.py | 3 +- test.py | 3 +- 3 files changed, 112 insertions(+), 111 deletions(-) diff --git a/README.md b/README.md index 5d7b0e2..1560545 100644 --- a/README.md +++ b/README.md @@ -31,111 +31,112 @@ problem, solution = mathgen.genById(0) | Id | Skill | Example problem | Example Solution | Function Name | |------|-----------------------------------|--------------------|-----------------------|--------------------------| [//]: # list start -| 0 | Addition | 46+4= | 50 | addition | -| 1 | Subtraction | 63-13= | 50 | subtraction | -| 2 | Multiplication | 25*0= | 0 | multiplication | -| 3 | Division | 66/99= | 0.6666666666666666 | division | -| 4 | Binary Complement 1s | 011101111= | 100010000 | binary_complement_1s | -| 5 | Modulo Division | 50%72= | 50 | modulo_division | -| 6 | Square Root | sqrt(9)= | 3 | square_root | -| 7 | Power Rule Differentiation | 5x^8 + 8x^1 + 5x^2 + 7x^9 + 9x^6 | 40x^7 + 8x^0 + 10x^1 + 63x^8 + 54x^5 | power_rule_differentiation | -| 8 | Square | 12^2= | 144 | square | -| 9 | LCM (Least Common Multiple) | LCM of 14 and 12 = | 84 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 9 and 20 = | 1 | gcd | -| 11 | Basic Algebra | 9x + 7 = 10 | 1/3 | basic_algebra | -| 12 | Logarithm | log2(16) | 4 | log | -| 13 | Easy Division | 120/24 = | 5 | int_division | -| 14 | Decimal to Binary | Binary of 27= | 11011 | decimal_to_binary | -| 15 | Binary to Decimal | 1101100000 | 864 | binary_to_decimal | -| 16 | Fraction Division | (2/10)/(10/8) | 4/25 | divide_fractions | -| 17 | Integer Multiplication with 2x2 Matrix | 16 * [[1, 1], [5, 0]] = | [[16,16],[80,0]] | multiply_int_to_22_matrix | -| 18 | Area of Triangle | Area of triangle with side lengths: 18 11 18 = | 94.26525075551436 | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 10, 26 and 25 exist? | Yes | valid_triangle | -| 20 | Midpoint of the two point | (9,-6),(-9,-18)= | (0.0,-12.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+3x+2 | (x+1)(x+2) | factoring | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 18 and 24 = | 138 | third_angle_of_triangle | -| 23 | Solve a System of Equations in R^2 | -8x + 5y = 33, 7x - 3y = -33 | x = -6, y = -3 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (-3, -18) and (6, -17) | sqrt(82) | distance_two_points | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 19 and 3 = | 19.24 | pythagorean_theorem | -| 26 | Linear Equations | -6x + -19y = 42, -20x + -14y = 140 | x = -7, y = 0 | linear_equations | -| 27 | Prime Factorisation | Find prime factors of 193 | [193] | prime_factors | -| 28 | Fraction Multiplication | (5/4)*(7/10) | 7/8 | fraction_multiplication | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 11 sides | 147.27 | angle_regular_polygon | -| 30 | Combinations of Objects | Number of combinations from 17 objects picked 3 at a time | 680 | combinations | -| 31 | Factorial | 2! = | 2 | factorial | -| 32 | Surface Area of Cube | Surface area of cube with side = 16m is | 1536 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 1m, 2m, 7m is | 46 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 37m and radius = 11m is | 3317 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 5m is | 125 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 2m, 20m, 8m is | 320 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 25m and radius = 5m is | 1963 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 14m and radius = 4m is | 233 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 33m and radius = 17m is | 9987 m^3 | volume_cone | -| 40 | Common Factors | Common Factors of 29 and 41 = | [1] | common_factors | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -2/2x + 3 and y = -10/2x - 1 | (-1, 4) | intersection_of_two_lines | -| 42 | Permutations | Number of Permutations from 18 objects picked 9 at a time = | 17643225600 | permutation | -| 43 | Cross Product of 2 Vectors | [-3, 6, -11] X [15, -16, 15] = | [-86, -120, -42] | vector_cross | -| 44 | Compare Fractions | Which symbol represents the comparison between 4/8 and 9/7? | < | compare_fractions | -| 45 | Simple Interest | Simple interest for a principle amount of 9046 dollars, 1% rate of interest and for a time period of 9 years is = | 814.14 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
11-1
-194
-103-8
and
6-46
075
27-8
|
4-419
2957
-76519
| matrix_multiplication | -| 47 | Cube Root | cuberoot of 335 upto 2 decimal places is: | 6.95 | cube_root | -| 48 | Power Rule Integration | 1x^5 + 3x^1 | (1/5)x^6 + (3/1)x^2 + c | power_rule_integration | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 64 , 57, 213 = | 26 | fourth_angle_of_quadrilateral | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 96x^2+191x+81=0 | [-0.61, -1.38] | quadratic_equation | -| 51 | HCF (Highest Common Factor) | HCF of 15 and 12 = | 3 | hcf | -| 52 | Probability of a certain sum appearing on faces of dice | If 1 dice are rolled at the same time, the probability of getting a sum of 2 = | 1/6 | dice_sum_probability | -| 53 | Exponentiation | 11^4 = | 14641 | exponentiation | -| 54 | Confidence interval For sample S | The confidence interval for sample [236, 288, 281, 252, 250, 254, 263, 228, 248, 245, 214, 221, 247, 235, 220, 286, 292, 242, 268, 215, 243, 283, 282, 212] with 99% confidence is | (263.2888975746178, 237.12776909204885) | confidence_interval | -| 55 | Comparing surds | Fill in the blanks 13^(1/4) _ 35^(1/1) | < | surds_comparison | -| 56 | Fibonacci Series | The Fibonacci Series of the first 5 numbers is ? | [0, 1, 1, 2, 3] | fibonacci_series | -| 57 | Trigonometric Values | What is cos(30)? | √3/2 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 9 sides = | 1260 | sum_of_polygon_angles | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[45, 17, 14, 27, 12, 11, 13, 38, 14, 48, 38, 48, 30, 41, 36] | The Mean is 28.8 , Standard Deviation is 186.69333333333333, Variance is 13.663576886501328 | data_summary | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 2m is | 50.26548245743669 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 95 m = | 3591364.0018287315 m^3 | volume_sphere | -| 62 | nth Fibonacci number | What is the 37th Fibonacci number? | 24157817 | nth_fibonacci_number | -| 63 | Profit or Loss Percent | Profit percent when CP = 169 and SP = 360 is: | 113.01775147928994 | profit_loss_percent | -| 64 | Binary to Hexidecimal | 100010 | 0x22 | binary_to_hex | -| 65 | Multiplication of 2 complex numbers | (12+17j) * (11-3j) = | (183+151j) | multiply_complex_numbers | -| 66 | Geometric Progression | For the given GP [10, 60, 360, 2160, 12960, 77760] ,Find the value of a,common ratio,11th term value, sum upto 7th term | The value of a is 10, common ratio is 6 , 11th term is 604661760 , sum upto 7th term is 559870.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 16 , 99 , 82 , 40 = | (16*99*82*40)^(1/4) = 47.742730688054316 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 64 , 21 , 60 , 61 = | 4/((1/64) + (1/21) + (1/60) + (1/61)) = 41.53507105403146 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[508.56178681813515, 829.8393085389811, 141.9778436425696, 157.79854813315953, 936.4111703191011, 60.03432095552797, 309.1650693726604, 532.5680163890804, 249.7649337521495, 693.033334449361, 726.1934281438319, 824.6613026949497, 40.71867012843633] is: | 2000.941549572921 | euclidian_norm | -| 70 | Angle between 2 vectors | angle between the vectors [108.86, 442.35, 675.26, 315.79, 885.28, 45.3, 892.33, 447.4] and [987.81, 887.54, 199.52, 477.21, 587.71, 963.72, 615.65, 226.26] is: | 0.87 radians | angle_btw_vectors | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -55 and 41 = | 96 | absolute_difference | -| 72 | Dot Product of 2 Vectors | [19, -17, -13] . [-16, 11, 5] = | -556 | vector_dot | -| 73 | Binary 2's Complement | 2's complement of 100 = | 100 | binary_2s_complement | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[65, 2, 89], [51, 73, 27], [48, 19, 39]]) is: | Matrix([[-778/25097, -1613/75291, 6443/75291], [231/25097, 579/25097, -928/25097], [845/25097, 1139/75291, -4643/75291]]) | invert_matrix | -| 75 | Area of a Sector | Given radius, 15 and angle, 33. Find the area of the sector. | Area of sector = 64.79535 | sector_area | -| 76 | Mean and Median | Given the series of numbers [68, 8, 77, 86, 93, 66, 6, 65, 41, 26]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 53.6 and Arithmetic median of this series is 65.5 | mean_median | -| 77 | Determinant to 2x2 Matrix | Det([[32, 3], [36, 4]]) = | 20 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 7744 dollars, 10% rate of interest and for a time period of 2 year is = | 9370.24 | compound_interest | -| 79 | Decimal to Hexadecimal | Binary of 803= | 0x323 | decimal_to_hexadeci | -| 80 | Percentage of a number | What is 24% of 7? | Required percentage = 1.68% | percentage | -| 81 | Celsius To Fahrenheit | Convert 50 degrees Celsius to degrees Fahrenheit = | 122.0 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 38 of the AP series: 37, -6, -49 ... | -1554 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 50 terms of the AP series: -23, 65, 153 ... | 106650.0 | arithmetic_progression_sum | -| 84 | Converts decimal to octal | The decimal number 1900 in Octal is: | 0o3554 | decimal_to_octal | -| 85 | Converts decimal to Roman Numerals | The number 2656 in Roman Numerals is: | MMDCLVI | decimal_to_roman_numerals | -| 86 | Degrees to Radians | Angle 184 in radians is = | 3.21 | degree_to_rad | -| 87 | Radians to Degrees | Angle 0 in degrees is = | 0.0 | radian_to_deg | -| 88 | Differentiation | differentiate w.r.t x : d(tan(x)+9*x^4)/dx | 36*x^3 + tan(x)^2 + 1 | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 93x^2 + 7x + 75 is = | 109.5 | definite_integral | -| 90 | isprime | 96 | False | is_prime | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 29973 | bcd_to_decimal | -| 92 | Complex To Polar Form | rexp(itheta) = | 15.65exp(i0.46) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 10, 3, 7} ,b={2, 4, 7, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {2, 3, 4, 7, 8, 9, 10},Intersection is {10, 7}, a-b is {8, 3},b-a is {9, 2, 4}, Symmetric difference is {2, 3, 4, 8, 9} | set_operation | -| 94 | Base Conversion | Convert 3540 from base 10 to base 14. | 140C | base_conversion | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 48 and height, 64? | CSA of cylinder = 19301.95 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 3 sided polygon with lengths of [23, 3, 55]cm is: | 81 | perimeter_of_polygons | -| 97 | Power of Powers | The 9^5^2 = 9^(5*2) = 9^10 | 3486784401 | power_of_powers | -| 98 | Quotient of Powers with Same Base | The Quotient of 40^3 and 40^5 = 40^(3-5) = 40^-2 | 0.000625 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 49^1 and 19^1 = (49/19)^1 = 2.5789473684210527^1 | 2.5789473684210527 | quotient_of_power_same_power | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 6x^2 + 8x + 1 = 0 | simplified solution : ((-0.14, -1.194)), generalized solution : ((-8 + sqrt(40))/2*6, (-8 - sqrt(40))/2*6) | complex_quadratic | -| 101 | Leap Year or Not | Year 2064 | is a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 442 minutes to Hours & Minutes | 7 hours and 22 minutes | minutes_to_hours | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 5507 is = | 1583 | decimal_to_bcd | -| 104 | Circumference | Circumference of circle with radius 94 | 590.6194188748811 | circumference | -| 105 | Combine Like terms | 9x^4 + 3x^6 + 9x^1 + 2x^2 + 1x^5 + 2x^3 + 6x^3 + 4x^1 | 13x^1 + 2x^2 + 8x^3 + 9x^4 + 1x^5 + 3x^6 | combine_like_terms | -| 106 | signum function | signum of 697 is = | 1 | signum_function | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.51% of population have. Test sensitivity (true positive) is equal to SN= 94.60% whereas test specificity (true negative) SP= 93.00%. What is the probability that this guy really has that disease? | 17.16% | conditional_probability | +| 0 | Addition | 14+24= | 38 | addition | +| 1 | Subtraction | 71-17= | 54 | subtraction | +| 2 | Multiplication | 71*1= | 71 | multiplication | +| 3 | Division | 98/53= | 1.849056603773585 | division | +| 4 | Binary Complement 1s | 000001000= | 111110111 | binary_complement_1s | +| 5 | Modulo Division | 19%62= | 19 | modulo_division | +| 6 | Square Root | sqrt(25)= | 5 | square_root | +| 7 | Power Rule Differentiation | 6x^9 + 5x^2 + 1x^7 + 5x^7 | 54x^8 + 10x^1 + 7x^6 + 35x^6 | power_rule_differentiation | +| 8 | Square | 10^2= | 100 | square | +| 9 | LCM (Least Common Multiple) | LCM of 2 and 12 = | 12 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 2 and 14 = | 2 | gcd | +| 11 | Basic Algebra | 2x + 9 = 9 | 0 | basic_algebra | +| 12 | Logarithm | log3(3) | 1 | log | +| 13 | Easy Division | 204/17 = | 12 | int_division | +| 14 | Decimal to Binary | Binary of 61= | 111101 | decimal_to_binary | +| 15 | Binary to Decimal | 10101 | 21 | binary_to_decimal | +| 16 | Fraction Division | (8/2)/(5/3) | 12/5 | divide_fractions | +| 17 | Integer Multiplication with 2x2 Matrix | 3 * [[10, 1], [1, 1]] = | [[30,3],[3,3]] | multiply_int_to_22_matrix | +| 18 | Area of Triangle | Area of triangle with side lengths: 4 10 16 = | (1.7587650643960612e-15+28.722813232690143j) | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 8, 29 and 19 exist? | No | valid_triangle | +| 20 | Midpoint of the two point | (-16,7),(11,-1)= | (-2.5,3.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+18x+80 | (x+10)(x+8) | factoring | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 75 and 36 = | 69 | third_angle_of_triangle | +| 23 | Solve a System of Equations in R^2 | 6x + y = 25, 6x - 7y = -31 | x = 3, y = 7 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (-18, 12) and (5, 9) | sqrt(538) | distance_two_points | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 9 and 15 = | 17.49 | pythagorean_theorem | +| 26 | Linear Equations | -8x + 2y = 12, 1x + 11y = -24 | x = -2, y = -2 | linear_equations | +| 27 | Prime Factorisation | Find prime factors of 103 | [103] | prime_factors | +| 28 | Fraction Multiplication | (5/9)*(3/5) | 1/3 | fraction_multiplication | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 17 sides | 158.82 | angle_regular_polygon | +| 30 | Combinations of Objects | Number of combinations from 13 objects picked 7 at a time | 1716 | combinations | +| 31 | Factorial | 4! = | 24 | factorial | +| 32 | Surface Area of Cube | Surface area of cube with side = 9m is | 486 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 2m, 16m, 11m is | 460 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 5m and radius = 14m is | 1671 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 17m is | 4913 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 18m, 5m, 19m is | 1710 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 40m and radius = 4m is | 2010 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 28m and radius = 17m is | 2657 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 45m and radius = 8m is | 3015 m^3 | volume_cone | +| 40 | Common Factors | Common Factors of 83 and 21 = | [1] | common_factors | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 0/5x + 1 and y = 5/5x - 5 | (6, 1) | intersection_of_two_lines | +| 42 | Permutations | Number of Permutations from 10 objects picked 8 at a time = | 1814400 | permutation | +| 43 | Cross Product of 2 Vectors | [-14, -20, 15] X [12, -11, 11] = | [-55, 334, 394] | vector_cross | +| 44 | Compare Fractions | Which symbol represents the comparison between 7/5 and 5/8? | > | compare_fractions | +| 45 | Simple Interest | Simple interest for a principle amount of 9940 dollars, 6% rate of interest and for a time period of 5 years is = | 2982.0 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
102
-80
and
3-415
-11-10-1
|
28-38-1048
-2432-8-40
| matrix_multiplication | +| 47 | Cube Root | cuberoot of 25 upto 2 decimal places is: | 2.92 | cube_root | +| 48 | Power Rule Integration | 2x^4 + 9x^10 + 7x^1 + 5x^10 + 3x^7 | (2/4)x^5 + (9/10)x^11 + (7/1)x^2 + (5/10)x^11 + (3/7)x^8 + c | power_rule_integration | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 61 , 128, 38 = | 133 | fourth_angle_of_quadrilateral | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 22x^2+199x+24=0 | [-0.12, -8.92] | quadratic_equation | +| 51 | HCF (Highest Common Factor) | HCF of 1 and 1 = | 1 | hcf | +| 52 | Probability of a certain sum appearing on faces of dice | If 1 dice are rolled at the same time, the probability of getting a sum of 6 = | 1/6 | dice_sum_probability | +| 53 | Exponentiation | 2^10 = | 1024 | exponentiation | +| 54 | Confidence interval For sample S | The confidence interval for sample [200, 254, 212, 257, 239, 235, 250, 203, 227, 281, 275, 291, 224, 216, 249, 293, 266, 264, 278, 265] with 80% confidence is | (256.9254800588742, 240.97451994112578) | confidence_interval | +| 55 | Comparing surds | Fill in the blanks 59^(1/6) _ 50^(1/8) | > | surds_comparison | +| 56 | Fibonacci Series | The Fibonacci Series of the first 3 numbers is ? | [0, 1, 1] | fibonacci_series | +| 57 | Trigonometric Values | What is tan(45)? | 1 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[28, 23, 25, 46, 36, 42, 48, 40, 23, 21, 32, 25, 41, 43, 35] | The Mean is 33.86666666666667 , Standard Deviation is 79.18222222222222, Variance is 8.898439313847245 | data_summary | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 19m is | 4536.459791783661 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 51 m = | 555647.2094551196 m^3 | volume_sphere | +| 62 | nth Fibonacci number | What is the 55th Fibonacci number? | 139583862445 | nth_fibonacci_number | +| 63 | Profit or Loss Percent | Profit percent when CP = 777 and SP = 861 is: | 10.81081081081081 | profit_loss_percent | +| 64 | Binary to Hexidecimal | 001 | 0x1 | binary_to_hex | +| 65 | Multiplication of 2 complex numbers | (16-6j) * (2+2j) = | (44+20j) | multiply_complex_numbers | +| 66 | Geometric Progression | For the given GP [4, 32, 256, 2048, 16384, 131072] ,Find the value of a,common ratio,6th term value, sum upto 7th term | The value of a is 4, common ratio is 8 , 6th term is 131072 , sum upto 7th term is 1198372.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 45 , 3 , 1 , 97 = | (45*3*1*97)^(1/4) = 10.69735419328368 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 45 , 38 , 75 , 60 = | 4/((1/45) + (1/38) + (1/75) + (1/60)) = 50.9307520476545 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[591.4087216014599, 881.9117537447569, 886.791583815644, 686.4762274423125, 908.6374557556007, 623.6706969012301, 457.24550363026395] is: | 1951.6255163618057 | euclidian_norm | +| 70 | Angle between 2 vectors | angle between the vectors [441.74, 751.22, 829.23] and [983.73, 131.61, 537.34] is: | 0.77 radians | angle_btw_vectors | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -72 and 18 = | 90 | absolute_difference | +| 72 | Dot Product of 2 Vectors | [-19, 18, 12] . [18, -13, -17] = | -780 | vector_dot | +| 73 | Binary 2's Complement | 2's complement of 1001000001 = | 110111111 | binary_2s_complement | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[61, 3, 14], [4, 5, 7], [13, 8, 95]]) is: | Matrix([[419/24230, -173/24230, -49/24230], [-289/24230, 5613/24230, -371/24230], [-33/24230, -449/24230, 293/24230]]) | invert_matrix | +| 75 | Area of a Sector | Given radius, 39 and angle, 161. Find the area of the sector. | Area of sector = 2136.98986 | sector_area | +| 76 | Mean and Median | Given the series of numbers [52, 72, 62, 2, 15, 95, 33, 55, 66, 32]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 48.4 and Arithmetic median of this series is 53.5 | mean_median | +| 77 | Determinant to 2x2 Matrix | Det([[16, 57], [90, 67]]) = | -4058 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 3519 dollars, 2% rate of interest and for a time period of 4 year is = | 3809.08 | compound_interest | +| 79 | Decimal to Hexadecimal | Binary of 593= | 0x251 | decimal_to_hexadeci | +| 80 | Percentage of a number | What is 11% of 83? | Required percentage = 9.13% | percentage | +| 81 | Celsius To Fahrenheit | Convert -3 degrees Celsius to degrees Fahrenheit = | 26.6 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 87 of the AP series: -37, 4, 45 ... | 3489 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 91 terms of the AP series: 62, 29, -4 ... | -129493.0 | arithmetic_progression_sum | +| 84 | Converts decimal to octal | The decimal number 432 in Octal is: | 0o660 | decimal_to_octal | +| 85 | Converts decimal to Roman Numerals | The number 2876 in Roman Numerals is: | MMDCCCLXXVI | decimal_to_roman_numerals | +| 86 | Degrees to Radians | Angle 307 in radians is = | 5.36 | degree_to_rad | +| 87 | Radians to Degrees | Angle 2 in degrees is = | 114.59 | radian_to_deg | +| 88 | Differentiation | differentiate w.r.t x : d(sin(x)+2*x^(-4))/dx | cos(x) - 8/x^5 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 24x^2 + 30x + 41 is = | 64.0 | definite_integral | +| 90 | isprime | 10 | False | is_prime | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 4436 | bcd_to_decimal | +| 92 | Complex To Polar Form | rexp(itheta) = | 18.0exp(i1.57) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={9, 2, 3} ,b={1, 2, 5, 7, 8, 9}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 5, 7, 8, 9},Intersection is {9, 2}, a-b is {3},b-a is {8, 1, 5, 7}, Symmetric difference is {1, 3, 5, 7, 8} | set_operation | +| 94 | Base Conversion | Convert 23750 from base 10 to base 16. | 5CC6 | base_conversion | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 36 and height, 11? | CSA of cylinder = 2488.14 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 12 sided polygon with lengths of [18, 104, 35, 2, 48, 4, 80, 48, 114, 28, 30, 18]cm is: | 529 | perimeter_of_polygons | +| 97 | Power of Powers | The 21^7^10 = 21^(7*10) = 21^70 | 359211830356099179055407266181227770855602632046883281967355597156308256906315688053426887401 | power_of_powers | +| 98 | Quotient of Powers with Same Base | The Quotient of 20^7 and 20^8 = 20^(7-8) = 20^-1 | 0.05 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 8^5 and 29^5 = (8/29)^5 = 0.27586206896551724^5 | 0.0015975701800030801 | quotient_of_power_same_power | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 7x + 9 = 0 | simplified solution : ((-1.697, -5.303)), generalized solution : ((-7 + sqrt(13))/2*1, (-7 - sqrt(13))/2*1) | complex_quadratic | +| 101 | Leap Year or Not | Year 1916 | is a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 913 minutes to Hours & Minutes | 15 hours and 13 minutes | minutes_to_hours | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 3865 is = | 1519 | decimal_to_bcd | +| 104 | Circumference | Circumference of circle with radius 41 | 257.610597594363 | circumference | +| 105 | Combine Like terms | 5x^1 + 5x^1 | 10x^1 | combine_like_terms | +| 106 | signum function | signum of -580 is = | -1 | signum_function | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.53% of population have. Test sensitivity (true positive) is equal to SN= 90.63% whereas test specificity (true negative) SP= 95.99%. What is the probability that this guy really has that disease? | 25.99% | conditional_probability | +| 108 | Arc length of Angle | Given radius, 4 and angle, 18. Find the arc length of the angle. | Arc length of the angle = 1.25664 | arc_length | diff --git a/mathgenerator/funcs/arc_length.py b/mathgenerator/funcs/arc_length.py index 3b18b52..d88090e 100644 --- a/mathgenerator/funcs/arc_length.py +++ b/mathgenerator/funcs/arc_length.py @@ -11,4 +11,5 @@ def arclengthFunc(maxRadius=49, maxAngle=359): return problem, solution -arc_length = Generator("Arc length of Angle", 106, " Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc) +arc_length = Generator("Arc length of Angle", 108, + " Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc) diff --git a/test.py b/test.py index bc610af..ab136e2 100644 --- a/test.py +++ b/test.py @@ -10,5 +10,4 @@ for item in list: print(item[2]) # print(mathgen.getGenList()) -print(mathgen.circumference()) -print(mathgen.genById(106)) +print(mathgen.genById(108)) From 8f2b458007683eed1cf820ad787a5787488ba2f2 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Mon, 26 Oct 2020 13:20:14 -0400 Subject: [PATCH 19/19] binomial distribution fix --- README.md | 215 ++++++++++--------- mathgenerator/funcs/binomial_distribution.py | 2 +- test.py | 2 +- 3 files changed, 110 insertions(+), 109 deletions(-) diff --git a/README.md b/README.md index 1560545..30f9247 100644 --- a/README.md +++ b/README.md @@ -31,112 +31,113 @@ problem, solution = mathgen.genById(0) | Id | Skill | Example problem | Example Solution | Function Name | |------|-----------------------------------|--------------------|-----------------------|--------------------------| [//]: # list start -| 0 | Addition | 14+24= | 38 | addition | -| 1 | Subtraction | 71-17= | 54 | subtraction | -| 2 | Multiplication | 71*1= | 71 | multiplication | -| 3 | Division | 98/53= | 1.849056603773585 | division | -| 4 | Binary Complement 1s | 000001000= | 111110111 | binary_complement_1s | -| 5 | Modulo Division | 19%62= | 19 | modulo_division | +| 0 | Addition | 10+48= | 58 | addition | +| 1 | Subtraction | 92-21= | 71 | subtraction | +| 2 | Multiplication | 89*0= | 0 | multiplication | +| 3 | Division | 9/11= | 0.8181818181818182 | division | +| 4 | Binary Complement 1s | 11001= | 00110 | binary_complement_1s | +| 5 | Modulo Division | 45%50= | 45 | modulo_division | | 6 | Square Root | sqrt(25)= | 5 | square_root | -| 7 | Power Rule Differentiation | 6x^9 + 5x^2 + 1x^7 + 5x^7 | 54x^8 + 10x^1 + 7x^6 + 35x^6 | power_rule_differentiation | -| 8 | Square | 10^2= | 100 | square | -| 9 | LCM (Least Common Multiple) | LCM of 2 and 12 = | 12 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 2 and 14 = | 2 | gcd | -| 11 | Basic Algebra | 2x + 9 = 9 | 0 | basic_algebra | -| 12 | Logarithm | log3(3) | 1 | log | -| 13 | Easy Division | 204/17 = | 12 | int_division | -| 14 | Decimal to Binary | Binary of 61= | 111101 | decimal_to_binary | -| 15 | Binary to Decimal | 10101 | 21 | binary_to_decimal | -| 16 | Fraction Division | (8/2)/(5/3) | 12/5 | divide_fractions | -| 17 | Integer Multiplication with 2x2 Matrix | 3 * [[10, 1], [1, 1]] = | [[30,3],[3,3]] | multiply_int_to_22_matrix | -| 18 | Area of Triangle | Area of triangle with side lengths: 4 10 16 = | (1.7587650643960612e-15+28.722813232690143j) | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 8, 29 and 19 exist? | No | valid_triangle | -| 20 | Midpoint of the two point | (-16,7),(11,-1)= | (-2.5,3.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+18x+80 | (x+10)(x+8) | factoring | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 75 and 36 = | 69 | third_angle_of_triangle | -| 23 | Solve a System of Equations in R^2 | 6x + y = 25, 6x - 7y = -31 | x = 3, y = 7 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (-18, 12) and (5, 9) | sqrt(538) | distance_two_points | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 9 and 15 = | 17.49 | pythagorean_theorem | -| 26 | Linear Equations | -8x + 2y = 12, 1x + 11y = -24 | x = -2, y = -2 | linear_equations | -| 27 | Prime Factorisation | Find prime factors of 103 | [103] | prime_factors | -| 28 | Fraction Multiplication | (5/9)*(3/5) | 1/3 | fraction_multiplication | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 17 sides | 158.82 | angle_regular_polygon | -| 30 | Combinations of Objects | Number of combinations from 13 objects picked 7 at a time | 1716 | combinations | -| 31 | Factorial | 4! = | 24 | factorial | -| 32 | Surface Area of Cube | Surface area of cube with side = 9m is | 486 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 2m, 16m, 11m is | 460 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 5m and radius = 14m is | 1671 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 17m is | 4913 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 18m, 5m, 19m is | 1710 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 40m and radius = 4m is | 2010 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 28m and radius = 17m is | 2657 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 45m and radius = 8m is | 3015 m^3 | volume_cone | -| 40 | Common Factors | Common Factors of 83 and 21 = | [1] | common_factors | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 0/5x + 1 and y = 5/5x - 5 | (6, 1) | intersection_of_two_lines | -| 42 | Permutations | Number of Permutations from 10 objects picked 8 at a time = | 1814400 | permutation | -| 43 | Cross Product of 2 Vectors | [-14, -20, 15] X [12, -11, 11] = | [-55, 334, 394] | vector_cross | -| 44 | Compare Fractions | Which symbol represents the comparison between 7/5 and 5/8? | > | compare_fractions | -| 45 | Simple Interest | Simple interest for a principle amount of 9940 dollars, 6% rate of interest and for a time period of 5 years is = | 2982.0 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
102
-80
and
3-415
-11-10-1
|
28-38-1048
-2432-8-40
| matrix_multiplication | -| 47 | Cube Root | cuberoot of 25 upto 2 decimal places is: | 2.92 | cube_root | -| 48 | Power Rule Integration | 2x^4 + 9x^10 + 7x^1 + 5x^10 + 3x^7 | (2/4)x^5 + (9/10)x^11 + (7/1)x^2 + (5/10)x^11 + (3/7)x^8 + c | power_rule_integration | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 61 , 128, 38 = | 133 | fourth_angle_of_quadrilateral | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 22x^2+199x+24=0 | [-0.12, -8.92] | quadratic_equation | -| 51 | HCF (Highest Common Factor) | HCF of 1 and 1 = | 1 | hcf | -| 52 | Probability of a certain sum appearing on faces of dice | If 1 dice are rolled at the same time, the probability of getting a sum of 6 = | 1/6 | dice_sum_probability | +| 7 | Power Rule Differentiation | 3x^8 + 3x^3 + 8x^4 + 8x^8 + 8x^5 | 24x^7 + 9x^2 + 32x^3 + 64x^7 + 40x^4 | power_rule_differentiation | +| 8 | Square | 3^2= | 9 | square | +| 9 | LCM (Least Common Multiple) | LCM of 13 and 16 = | 208 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 1 and 20 = | 1 | gcd | +| 11 | Basic Algebra | 4x + 2 = 9 | 7/4 | basic_algebra | +| 12 | Logarithm | log2(8) | 3 | log | +| 13 | Easy Division | 10/5 = | 2 | int_division | +| 14 | Decimal to Binary | Binary of 89= | 1011001 | decimal_to_binary | +| 15 | Binary to Decimal | 00011010 | 26 | binary_to_decimal | +| 16 | Fraction Division | (5/9)/(5/1) | 1/9 | divide_fractions | +| 17 | Integer Multiplication with 2x2 Matrix | 9 * [[7, 6], [0, 3]] = | [[63,54],[0,27]] | multiply_int_to_22_matrix | +| 18 | Area of Triangle | Area of triangle with side lengths: 7 6 9 = | 20.97617696340303 | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 1, 9 and 28 exist? | No | valid_triangle | +| 20 | Midpoint of the two point | (11,-12),(-16,-17)= | (-2.5,-14.5) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+6x-7 | (x-1)(x+7) | factoring | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 76 and 64 = | 40 | third_angle_of_triangle | +| 23 | Solve a System of Equations in R^2 | -3x - 7y = -56, -8x + 5y = 40 | x = 0, y = 8 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (-14, 5) and (9, -4) | sqrt(610) | distance_two_points | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 9 and 9 = | 12.73 | pythagorean_theorem | +| 26 | Linear Equations | 15x = -75, 15x + -10y = -35 | x = -5, y = -4 | linear_equations | +| 27 | Prime Factorisation | Find prime factors of 101 | [101] | prime_factors | +| 28 | Fraction Multiplication | (6/2)*(10/4) | 15/2 | fraction_multiplication | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 12 sides | 150.0 | angle_regular_polygon | +| 30 | Combinations of Objects | Number of combinations from 13 objects picked 6 at a time | 1716 | combinations | +| 31 | Factorial | 6! = | 720 | factorial | +| 32 | Surface Area of Cube | Surface area of cube with side = 11m is | 726 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 18m, 14m, 3m is | 696 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 28m and radius = 16m is | 4423 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 8m is | 512 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 17m, 11m, 18m is | 3366 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 45m and radius = 7m is | 6927 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 19m and radius = 8m is | 719 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 44m and radius = 11m is | 5575 m^3 | volume_cone | +| 40 | Common Factors | Common Factors of 51 and 44 = | [1] | common_factors | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -7/3x - 5 and y = -1/2x - 8 | (18/11, -97/11) | intersection_of_two_lines | +| 42 | Permutations | Number of Permutations from 14 objects picked 3 at a time = | 2184 | permutation | +| 43 | Cross Product of 2 Vectors | [-12, 13, 1] X [-19, 11, 14] = | [171, 149, 115] | vector_cross | +| 44 | Compare Fractions | Which symbol represents the comparison between 3/8 and 6/9? | < | compare_fractions | +| 45 | Simple Interest | Simple interest for a principle amount of 8192 dollars, 2% rate of interest and for a time period of 2 years is = | 327.68 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
25
-10-5
99
and
4-5
-10-3
|
-42-25
1065
-54-72
| matrix_multiplication | +| 47 | Cube Root | cuberoot of 694 upto 2 decimal places is: | 8.85 | cube_root | +| 48 | Power Rule Integration | 1x^3 + 9x^3 | (1/3)x^4 + (9/3)x^4 + c | power_rule_integration | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 18 , 32, 236 = | 74 | fourth_angle_of_quadrilateral | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 75x^2+121x+43=0 | [-0.53, -1.08] | quadratic_equation | +| 51 | HCF (Highest Common Factor) | HCF of 19 and 10 = | 1 | hcf | +| 52 | Probability of a certain sum appearing on faces of dice | If 2 dice are rolled at the same time, the probability of getting a sum of 9 = | 4/36 | dice_sum_probability | | 53 | Exponentiation | 2^10 = | 1024 | exponentiation | -| 54 | Confidence interval For sample S | The confidence interval for sample [200, 254, 212, 257, 239, 235, 250, 203, 227, 281, 275, 291, 224, 216, 249, 293, 266, 264, 278, 265] with 80% confidence is | (256.9254800588742, 240.97451994112578) | confidence_interval | -| 55 | Comparing surds | Fill in the blanks 59^(1/6) _ 50^(1/8) | > | surds_comparison | -| 56 | Fibonacci Series | The Fibonacci Series of the first 3 numbers is ? | [0, 1, 1] | fibonacci_series | -| 57 | Trigonometric Values | What is tan(45)? | 1 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[28, 23, 25, 46, 36, 42, 48, 40, 23, 21, 32, 25, 41, 43, 35] | The Mean is 33.86666666666667 , Standard Deviation is 79.18222222222222, Variance is 8.898439313847245 | data_summary | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 19m is | 4536.459791783661 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 51 m = | 555647.2094551196 m^3 | volume_sphere | -| 62 | nth Fibonacci number | What is the 55th Fibonacci number? | 139583862445 | nth_fibonacci_number | -| 63 | Profit or Loss Percent | Profit percent when CP = 777 and SP = 861 is: | 10.81081081081081 | profit_loss_percent | -| 64 | Binary to Hexidecimal | 001 | 0x1 | binary_to_hex | -| 65 | Multiplication of 2 complex numbers | (16-6j) * (2+2j) = | (44+20j) | multiply_complex_numbers | -| 66 | Geometric Progression | For the given GP [4, 32, 256, 2048, 16384, 131072] ,Find the value of a,common ratio,6th term value, sum upto 7th term | The value of a is 4, common ratio is 8 , 6th term is 131072 , sum upto 7th term is 1198372.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 45 , 3 , 1 , 97 = | (45*3*1*97)^(1/4) = 10.69735419328368 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 45 , 38 , 75 , 60 = | 4/((1/45) + (1/38) + (1/75) + (1/60)) = 50.9307520476545 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[591.4087216014599, 881.9117537447569, 886.791583815644, 686.4762274423125, 908.6374557556007, 623.6706969012301, 457.24550363026395] is: | 1951.6255163618057 | euclidian_norm | -| 70 | Angle between 2 vectors | angle between the vectors [441.74, 751.22, 829.23] and [983.73, 131.61, 537.34] is: | 0.77 radians | angle_btw_vectors | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -72 and 18 = | 90 | absolute_difference | -| 72 | Dot Product of 2 Vectors | [-19, 18, 12] . [18, -13, -17] = | -780 | vector_dot | -| 73 | Binary 2's Complement | 2's complement of 1001000001 = | 110111111 | binary_2s_complement | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[61, 3, 14], [4, 5, 7], [13, 8, 95]]) is: | Matrix([[419/24230, -173/24230, -49/24230], [-289/24230, 5613/24230, -371/24230], [-33/24230, -449/24230, 293/24230]]) | invert_matrix | -| 75 | Area of a Sector | Given radius, 39 and angle, 161. Find the area of the sector. | Area of sector = 2136.98986 | sector_area | -| 76 | Mean and Median | Given the series of numbers [52, 72, 62, 2, 15, 95, 33, 55, 66, 32]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 48.4 and Arithmetic median of this series is 53.5 | mean_median | -| 77 | Determinant to 2x2 Matrix | Det([[16, 57], [90, 67]]) = | -4058 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 3519 dollars, 2% rate of interest and for a time period of 4 year is = | 3809.08 | compound_interest | -| 79 | Decimal to Hexadecimal | Binary of 593= | 0x251 | decimal_to_hexadeci | -| 80 | Percentage of a number | What is 11% of 83? | Required percentage = 9.13% | percentage | -| 81 | Celsius To Fahrenheit | Convert -3 degrees Celsius to degrees Fahrenheit = | 26.6 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 87 of the AP series: -37, 4, 45 ... | 3489 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 91 terms of the AP series: 62, 29, -4 ... | -129493.0 | arithmetic_progression_sum | -| 84 | Converts decimal to octal | The decimal number 432 in Octal is: | 0o660 | decimal_to_octal | -| 85 | Converts decimal to Roman Numerals | The number 2876 in Roman Numerals is: | MMDCCCLXXVI | decimal_to_roman_numerals | -| 86 | Degrees to Radians | Angle 307 in radians is = | 5.36 | degree_to_rad | -| 87 | Radians to Degrees | Angle 2 in degrees is = | 114.59 | radian_to_deg | -| 88 | Differentiation | differentiate w.r.t x : d(sin(x)+2*x^(-4))/dx | cos(x) - 8/x^5 | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 24x^2 + 30x + 41 is = | 64.0 | definite_integral | -| 90 | isprime | 10 | False | is_prime | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 4436 | bcd_to_decimal | -| 92 | Complex To Polar Form | rexp(itheta) = | 18.0exp(i1.57) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={9, 2, 3} ,b={1, 2, 5, 7, 8, 9}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 5, 7, 8, 9},Intersection is {9, 2}, a-b is {3},b-a is {8, 1, 5, 7}, Symmetric difference is {1, 3, 5, 7, 8} | set_operation | -| 94 | Base Conversion | Convert 23750 from base 10 to base 16. | 5CC6 | base_conversion | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 36 and height, 11? | CSA of cylinder = 2488.14 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 12 sided polygon with lengths of [18, 104, 35, 2, 48, 4, 80, 48, 114, 28, 30, 18]cm is: | 529 | perimeter_of_polygons | -| 97 | Power of Powers | The 21^7^10 = 21^(7*10) = 21^70 | 359211830356099179055407266181227770855602632046883281967355597156308256906315688053426887401 | power_of_powers | -| 98 | Quotient of Powers with Same Base | The Quotient of 20^7 and 20^8 = 20^(7-8) = 20^-1 | 0.05 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 8^5 and 29^5 = (8/29)^5 = 0.27586206896551724^5 | 0.0015975701800030801 | quotient_of_power_same_power | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 7x + 9 = 0 | simplified solution : ((-1.697, -5.303)), generalized solution : ((-7 + sqrt(13))/2*1, (-7 - sqrt(13))/2*1) | complex_quadratic | -| 101 | Leap Year or Not | Year 1916 | is a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 913 minutes to Hours & Minutes | 15 hours and 13 minutes | minutes_to_hours | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 3865 is = | 1519 | decimal_to_bcd | -| 104 | Circumference | Circumference of circle with radius 41 | 257.610597594363 | circumference | -| 105 | Combine Like terms | 5x^1 + 5x^1 | 10x^1 | combine_like_terms | -| 106 | signum function | signum of -580 is = | -1 | signum_function | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.53% of population have. Test sensitivity (true positive) is equal to SN= 90.63% whereas test specificity (true negative) SP= 95.99%. What is the probability that this guy really has that disease? | 25.99% | conditional_probability | -| 108 | Arc length of Angle | Given radius, 4 and angle, 18. Find the arc length of the angle. | Arc length of the angle = 1.25664 | arc_length | +| 54 | Confidence interval For sample S | The confidence interval for sample [235, 266, 205, 259, 244, 267, 261, 275, 248, 210, 287, 297, 212, 272, 228, 271, 249, 225, 280, 298, 237] with 90% confidence is | (263.3453075787769, 243.89278765931834) | confidence_interval | +| 55 | Comparing surds | Fill in the blanks 29^(1/8) _ 89^(1/9) | < | surds_comparison | +| 56 | Fibonacci Series | The Fibonacci Series of the first 6 numbers is ? | [0, 1, 1, 2, 3, 5] | fibonacci_series | +| 57 | Trigonometric Values | What is tan(60)? | √3 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 3 sides = | 180 | sum_of_polygon_angles | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[27, 39, 33, 10, 44, 14, 37, 17, 40, 35, 19, 11, 17, 6, 13] | The Mean is 24.133333333333333 , Standard Deviation is 152.91555555555553, Variance is 12.365902941376968 | data_summary | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 11m is | 1520.5308443374597 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 66 m = | 1204260.4287152681 m^3 | volume_sphere | +| 62 | nth Fibonacci number | What is the 69th Fibonacci number? | 117669030460994 | nth_fibonacci_number | +| 63 | Profit or Loss Percent | Profit percent when CP = 652 and SP = 967 is: | 48.31288343558282 | profit_loss_percent | +| 64 | Binary to Hexidecimal | 011011000 | 0xd8 | binary_to_hex | +| 65 | Multiplication of 2 complex numbers | (17+16j) * (-3-3j) = | (-3-99j) | multiply_complex_numbers | +| 66 | Geometric Progression | For the given GP [10, 70, 490, 3430, 24010, 168070] ,Find the value of a,common ratio,9th term value, sum upto 9th term | The value of a is 10, common ratio is 7 , 9th term is 57648010 , sum upto 9th term is 67256010.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 58 , 73 and 52 = | (58*73*52)^(1/3) = 60.383469885511204 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 2 numbers 91 and 18 = | 2/((1/91) + (1/18)) = 30.055045871559635 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[974.3536143874146, 686.168356481633, 586.22520680975] is: | 1328.1008893926917 | euclidian_norm | +| 70 | Angle between 2 vectors | angle between the vectors [700.08, 521.5, 513.19, 926.02, 781.96, 37.1, 485.31, 966.82, 811.5, 183.45, 703.93, 628.34, 756.44, 387.15, 771.41, 169.39, 48.66, 615.09] and [768.58, 809.43, 824.23, 109.11, 557.91, 3.33, 483.09, 188.14, 557.91, 655.56, 760.95, 864.19, 470.75, 149.17, 541.68, 615.69, 53.59, 859.28] is: | 0.6 radians | angle_btw_vectors | +| 71 | Absolute difference between two numbers | Absolute difference between numbers 15 and -2 = | 17 | absolute_difference | +| 72 | Dot Product of 2 Vectors | [17, -6, 10] . [-15, 17, -2] = | -377 | vector_dot | +| 73 | Binary 2's Complement | 2's complement of 1001 = | 111 | binary_2s_complement | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[70, 89, 73], [36, 43, 66], [96, 99, 13]]) is: | Matrix([[-1195/12566, 607/6283, 547/12566], [2934/31415, -3049/31415, -996/31415], [-282/31415, 807/31415, -97/31415]]) | invert_matrix | +| 75 | Area of a Sector | Given radius, 32 and angle, 157. Find the area of the sector. | Area of sector = 1402.96547 | sector_area | +| 76 | Mean and Median | Given the series of numbers [81, 67, 6, 16, 98, 69, 28, 60, 56, 20]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 50.1 and Arithmetic median of this series is 58.0 | mean_median | +| 77 | Determinant to 2x2 Matrix | Det([[88, 11], [75, 32]]) = | 1991 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 7240 dollars, 10% rate of interest and for a time period of 7 year is = | 14108.71 | compound_interest | +| 79 | Decimal to Hexadecimal | Binary of 181= | 0xb5 | decimal_to_hexadeci | +| 80 | Percentage of a number | What is 93% of 67? | Required percentage = 62.31% | percentage | +| 81 | Celsius To Fahrenheit | Convert -9 degrees Celsius to degrees Fahrenheit = | 15.8 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 93 of the AP series: 16, -72, -160 ... | -8080 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 40 terms of the AP series: 79, 111, 143 ... | 28120.0 | arithmetic_progression_sum | +| 84 | Converts decimal to octal | The decimal number 453 in Octal is: | 0o705 | decimal_to_octal | +| 85 | Converts decimal to Roman Numerals | The number 492 in Roman Numerals is: | CDXCII | decimal_to_roman_numerals | +| 86 | Degrees to Radians | Angle 146 in radians is = | 2.55 | degree_to_rad | +| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | +| 88 | Differentiation | differentiate w.r.t x : d(ln(x)+6*x^(-2))/dx | 1/x - 12/x^3 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 97x^2 + 21x + 68 is = | 110.8333 | definite_integral | +| 90 | isprime | 100 | False | is_prime | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 4 is = | 18071 | bcd_to_decimal | +| 92 | Complex To Polar Form | rexp(itheta) = | 20.25exp(i-1.22) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 3, 4, 6, 7, 8} ,b={8, 1, 3, 5}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 3, 4, 5, 6, 7, 8},Intersection is {8, 1, 3}, a-b is {4, 6, 7},b-a is {5}, Symmetric difference is {4, 5, 6, 7} | set_operation | +| 94 | Base Conversion | Convert 33792 from base 10 to base 8. | 102000 | base_conversion | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 12 and height, 87? | CSA of cylinder = 6559.65 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 11 sided polygon with lengths of [82, 107, 53, 3, 14, 47, 106, 22, 90, 87, 22]cm is: | 633 | perimeter_of_polygons | +| 97 | Power of Powers | The 37^1^5 = 37^(1*5) = 37^5 | 69343957 | power_of_powers | +| 98 | Quotient of Powers with Same Base | The Quotient of 46^3 and 46^7 = 46^(3-7) = 46^-4 | 2.2334111155977858e-07 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 40^3 and 20^3 = (40/20)^3 = 2.0^3 | 8.0 | quotient_of_power_same_power | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 6x + 1 = 0 | simplified solution : ((-0.177, -2.823)), generalized solution : ((-6 + sqrt(28))/2*2, (-6 - sqrt(28))/2*2) | complex_quadratic | +| 101 | Leap Year or Not | Year 1929 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 793 minutes to Hours & Minutes | 13 hours and 13 minutes | minutes_to_hours | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 9170 is = | 23132 | decimal_to_bcd | +| 104 | Circumference | Circumference of circle with radius 10 | 62.83185307179586 | circumference | +| 105 | Combine Like terms | 6x^1 + 3x^2 + 6x^2 | 6x^1 + 9x^2 | combine_like_terms | +| 106 | signum function | signum of 281 is = | 1 | signum_function | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.44% of population have. Test sensitivity (true positive) is equal to SN= 93.49% whereas test specificity (true negative) SP= 94.85%. What is the probability that this guy really has that disease? | 20.96% | conditional_probability | +| 108 | Arc length of Angle | Given radius, 42 and angle, 114. Find the arc length of the angle. | Arc length of the angle = 83.56636 | arc_length | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 40.72% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 13 pistons will contain no more than 7 rejected pistons? | 89.26 | binomial_distribution | diff --git a/mathgenerator/funcs/binomial_distribution.py b/mathgenerator/funcs/binomial_distribution.py index 03166e3..664004c 100644 --- a/mathgenerator/funcs/binomial_distribution.py +++ b/mathgenerator/funcs/binomial_distribution.py @@ -38,5 +38,5 @@ def binomialDistFunc(): return problem, answer -binomial_distribution = Generator("Binomial distribution", 107, +binomial_distribution = Generator("Binomial distribution", 109, "P(X