From 3f0ff6ea35e87a833ea3fd8a2ae931f8a4adf870 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 10:48:37 -0500 Subject: [PATCH 01/10] Organized readme and added imports to some generators --- README.md | 245 ++++++++++-------- makeReadme.py | 53 +++- mathgenerator/__init__.py | 8 +- .../algebra/intersection_of_two_lines.py | 1 + .../funcs/algebra/quadratic_equation.py | 1 + .../computer_science/nth_fibonacci_number.py | 1 + mathgenerator/funcs/geometry/arc_length.py | 2 + .../funcs/geometry/basic_trigonometry.py | 2 + mathgenerator/funcs/misc/complex_to_polar.py | 2 + .../funcs/misc/decimal_to_roman_numerals.py | 2 + mathgenerator/funcs/misc/euclidian_norm.py | 2 + mathgenerator/funcs/misc/surds_comparison.py | 2 + .../funcs/statistics/confidence_interval.py | 2 + mathgenerator/funcs/statistics/permutation.py | 2 + 14 files changed, 197 insertions(+), 128 deletions(-) diff --git a/README.md b/README.md index 5e09e7a..713454e 100644 --- a/README.md +++ b/README.md @@ -48,116 +48,137 @@ mathgen.write_pdf(worksheet) | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 30+50= | 80 | addition | -| 1 | Subtraction | 75-7= | 68 | subtraction | -| 2 | Multiplication | 23*3= | 69 | multiplication | -| 3 | Division | 230/10 = | 23 | division | -| 4 | Binary Complement 1s | 01110= | 10001 | binary_complement_1s | -| 5 | Modulo Division | 92%37= | 18 | modulo_division | -| 6 | Square Root | sqrt(144)= | 12 | square_root | -| 7 | Power Rule Differentiation | 7x^10 | 70x^9 | power_rule_differentiation | +## algebra +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 11 | Basic Algebra | 8x + 7 = 7 | 0 | basic_algebra | +| 12 | Logarithm | log2(32) | 5 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[10, 4], [7, 0]] = | [[100,40],[70,0]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (-11,1),(20,-20)= | (4.5,-9.5) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+14x+49 | (x+7)(x+7) | factoring | +| 23 | Solve a System of Equations in R^2 | 5x - y = 36, 8x + 7y = 135 | x = 9, y = 9 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (4, -7) and (-17, 21) | sqrt(1225) | distance_two_points | +| 26 | Linear Equations | -16x + 18y = -282, -4x + -14y = 22 | x = 12, y = -5 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 1/3x - 10 and y = -10/4x - 2 | (48/17, -154/17) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [14, 0, 10] X [18, -17, 17] = | [170, -58, -238] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 5365 dollars, 4% rate of interest and for a time period of 1 years is = | 214.6 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
5-9
0-2
-78
and
99-9-3
6-8-98
|
-911736-87
-121618-16
-15-127-985
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 1x^2+15x+17=0 | [-1.24, -13.76] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (17+15j) * (-20-10j) = | (-190-470j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [3, -14, -17] . [6, 16, -11] = | -19 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[38, 76, 13], [27, 97, 60], [32, 17, 71]]) is: | Matrix([[5867/188789, -5175/188789, 3299/188789], [3/188789, 2282/188789, -1929/188789], [-2645/188789, 1786/188789, 1634/188789]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[49, 17], [48, 27]]) = | 507 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 5556 dollars, 6% rate of interest and for a time period of 9 year is = | 9386.75 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 8x + 9 = 0 | simplified solution : ((-1.354, -6.646)), generalized solution : ((-8 + sqrt(28))/2*1, (-8 - sqrt(28))/2*1) | complex_quadratic | +| 105 | Combine Like terms | 9x^8 + 10x^4 + 10x^6 + 10x^2 + 7x^2 + 6x^6 + 5x^5 + 8x^4 + 10x^8 + 7x^1 | 7x^1 + 17x^2 + 18x^4 + 5x^5 + 16x^6 + 19x^8 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-3x-5)(+10x+6) | -30*x^2-68*x-30 | expanding | +## basic_math +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 0 | Addition | 27+49= | 76 | addition | +| 1 | Subtraction | 32-6= | 26 | subtraction | +| 2 | Multiplication | 36*1= | 36 | multiplication | +| 3 | Division | 450/18= | 25 | division | +| 6 | Square Root | sqrt(1)= | 1 | square_root | | 8 | Square | 6^2= | 36 | square | -| 9 | LCM (Least Common Multiple) | LCM of 15 and 8 = | 120 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 16 and 13 = | 1 | gcd | -| 11 | Basic Algebra | 3x + 4 = 6 | 2/3 | basic_algebra | -| 12 | Logarithm | log3(9) | 2 | log | -| 13 | Complex Division | 4/29= | 0.14 | complex_division | -| 14 | Decimal to Binary | Binary of 70= | 1000110 | decimal_to_binary | -| 15 | Binary to Decimal | 110000 | 48 | binary_to_decimal | -| 16 | Fraction Division | (2/9)/(9/10) | 20/81 | divide_fractions | -| 17 | Integer Multiplication with 2x2 Matrix | 4 * [[7, 4], [10, 2]] = | [[28,16],[40,8]] | multiply_int_to_22_matrix | -| 18 | Area of Triangle | Area of triangle with side lengths: 7 20 17 = | 57.445626465380286 | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 20, 18 and 34 exist? | Yes | valid_triangle | -| 20 | Midpoint of the two point | (20,20),(12,14)= | (16.0,17.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+2x | (x+2)(x) | factoring | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 16 and 2 = | 162 | third_angle_of_triangle | -| 23 | Solve a System of Equations in R^2 | 2x - 4y = 44, -9x - 4y = 22 | x = 2, y = -10 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (10, 1) and (-17, 8) | sqrt(778) | distance_two_points | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 19 and 1 = | 19.03 | pythagorean_theorem | -| 26 | Linear Equations | 2x + 15y = -211, 11x + -11y = 242 | x = 7, y = -15 | linear_equations | -| 27 | Prime Factorisation | Find prime factors of 199 | [199] | prime_factors | -| 28 | Fraction Multiplication | (6/7)*(9/5) | 54/35 | fraction_multiplication | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 9 sides | 140.0 | angle_regular_polygon | -| 30 | Combinations of Objects | Number of combinations from 17 objects picked 2 at a time | 136 | combinations | -| 31 | Factorial | 6! = | 720 | factorial | -| 32 | Surface Area of Cube | Surface area of cube with side = 8m is | 384 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 8m, 1m, 3m is | 70 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 4m and radius = 14m is | 1583 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 13m is | 2197 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 14m, 17m, 18m is | 4284 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 45m and radius = 9m is | 11451 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 40m and radius = 20m is | 4066 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 40m and radius = 4m is | 670 m^3 | volume_cone | -| 40 | Common Factors | Common Factors of 5 and 94 = | [1] | common_factors | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -6/4x + 10 and y = 10x - 2 | (24/23, 194/23) | intersection_of_two_lines | -| 42 | Permutations | Number of Permutations from 10 objects picked 0 at a time = | 1 | permutation | -| 43 | Cross Product of 2 Vectors | [-19, 5, 14] X [19, -3, -14] = | [-28, 0, -38] | vector_cross | -| 44 | Compare Fractions | Which symbol represents the comparison between 2/9 and 7/3? | < | compare_fractions | -| 45 | Simple Interest | Simple interest for a principle amount of 2924 dollars, 2% rate of interest and for a time period of 8 years is = | 467.84 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
-176
-107-8
1510
and
-10-10-8-1
-7-10109
8106-8
|
9011416
-13-50102137
3540102-36
| matrix_multiplication | -| 47 | Cube Root | cuberoot of 113 upto 2 decimal places is: | 4.83 | cube_root | -| 48 | Power Rule Integration | 3x^5 + 1x^10 + 10x^10 + 10x^9 + 1x^6 | (3/5)x^6 + (1/10)x^11 + (10/10)x^11 + (10/9)x^10 + (1/6)x^7 + c | power_rule_integration | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 165 , 67, 58 = | 70 | fourth_angle_of_quadrilateral | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 94x^2+200x+90=0 | [-0.65, -1.48] | quadratic_equation | -| 51 | HCF (Highest Common Factor) | HCF of 7 and 12 = | 1 | hcf | -| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 16 = | 6/216 | dice_sum_probability | -| 53 | Exponentiation | 16^3 = | 4096 | exponentiation | -| 54 | Confidence interval For sample S | The confidence interval for sample [200, 282, 224, 297, 230, 261, 260, 223, 290, 203, 268, 295, 202, 280, 210, 274, 214, 270, 205, 258, 237, 265] with 80% confidence is | (256.5414375664878, 238.73128970623947) | confidence_interval | -| 55 | Comparing surds | Fill in the blanks 15^(1/6) _ 86^(1/5) | < | 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 sin(90)? | 1 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 5 sides = | 540 | sum_of_polygon_angles | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[29, 30, 37, 47, 25, 21, 33, 33, 19, 22, 36, 16, 7, 26, 46] | The Mean is 28.466666666666665 , Standard Deviation is 109.71555555555557, Variance is 10.474519347232864 | data_summary | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 16m is | 3216.990877275948 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 86 m = | 2664305.1424956126 m^3 | volume_sphere | -| 62 | nth Fibonacci number | What is the 27th Fibonacci number? | 196418 | nth_fibonacci_number | -| 63 | Profit or Loss Percent | Profit percent when CP = 644 and SP = 662 is: | 2.7950310559006213 | profit_loss_percent | -| 64 | Binary to Hexidecimal | 1001100 | 0x4c | binary_to_hex | -| 65 | Multiplication of 2 complex numbers | (-4+10j) * -14j = | (140+56j) | multiply_complex_numbers | -| 66 | Geometric Progression | For the given GP [4, 12, 36, 108, 324, 972] ,Find the value of a,common ratio,7th term value, sum upto 11th term | The value of a is 4, common ratio is 3 , 7th term is 2916 , sum upto 11th term is 354292.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 2 numbers 8 and 39 = | (8*39)^(1/2) = 17.663521732655695 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 70 , 28 and 10 = | 3/((1/70) + (1/28) + (1/10)) = 20.0 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[140.27767298648374, 455.13963882440834, 712.0553226043899, 459.3121590782242, 524.4218909490598, 750.5372175572093, 808.8045224974901, 383.6429461786214, 429.4419005181599, 678.4158119220333, 949.0750177704684, 959.5226153129328, 480.3240208778324, 106.9115204040202] is: | 2300.592987768802 | euclidian_norm | -| 70 | Angle between 2 vectors | angle between the vectors [411.42, 822.89, 457.69, 983.28] and [516.87, 275.57, 334.47, 19.0] is: | 0.88 radians | angle_btw_vectors | -| 71 | Absolute difference between two numbers | Absolute difference between numbers 14 and -97 = | 111 | absolute_difference | -| 72 | Dot Product of 2 Vectors | [-2, 0, -18] . [9, 10, 15] = | -288 | vector_dot | -| 73 | Binary 2's Complement | 2's complement of 10 = | 10 | binary_2s_complement | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[71, 25, 61], [21, 23, 8], [41, 70, 11]]) is: | Matrix([[-307/12775, 799/2555, -1203/12775], [97/12775, -344/2555, 713/12775], [527/12775, -789/2555, 1108/12775]]) | invert_matrix | -| 75 | Area of a Sector | Given radius, 13 and angle, 322. Find the area of the sector. | Area of sector = 474.88664 | sector_area | -| 76 | Mean and Median | Given the series of numbers [42, 66, 61, 2, 25, 95, 18, 14, 96, 6]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 42.5 and Arithmetic median of this series is 33.5 | mean_median | -| 77 | Determinant to 2x2 Matrix | Det([[67, 22], [83, 9]]) = | -1223 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 1159 dollars, 3% rate of interest and for a time period of 9 year is = | 1512.23 | compound_interest | -| 79 | Decimal to Hexadecimal | Binary of 260= | 0x104 | decimal_to_hexadeci | -| 80 | Percentage of a number | What is 40% of 80? | Required percentage = 32.00% | percentage | -| 81 | Celsius To Fahrenheit | Convert 77 degrees Celsius to degrees Fahrenheit = | 170.6 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 19 of the AP series: 66, 109, 152 ... | 840 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 84 terms of the AP series: 59, 110, 161 ... | 182742.0 | arithmetic_progression_sum | -| 84 | Converts decimal to octal | The decimal number 983 in Octal is: | 0o1727 | decimal_to_octal | -| 85 | Converts decimal to Roman Numerals | The number 1994 in Roman Numerals is: | MCMXCIV | decimal_to_roman_numerals | -| 86 | Degrees to Radians | Angle 82 in radians is = | 1.43 | 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(sin(x)+7*x^3)/dx | 21*x^2 + cos(x) | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 65x^2 + 91x + 72 is = | 139.1667 | definite_integral | -| 90 | isprime | 64 | False | is_prime | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 4674 | bcd_to_decimal | -| 92 | Complex To Polar Form | rexp(itheta) = | 15.52exp(i1.83) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 3, 7, 8, 10} ,b={9, 10, 2, 5}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 5, 7, 8, 9, 10},Intersection is {10}, a-b is {8, 1, 3, 7},b-a is {9, 2, 5}, Symmetric difference is {1, 2, 3, 5, 7, 8, 9} | set_operation | -| 94 | Base Conversion | Convert 44639 from base 10 to base 6. | 542355 | base_conversion | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 46 and height, 69? | CSA of cylinder = 19942.83 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 12 sided polygon with lengths of [18, 4, 59, 94, 107, 115, 42, 99, 16, 73, 2, 51]cm is: | 680 | perimeter_of_polygons | -| 97 | Power of Powers | The 14^10^5 = 14^(10*5) = 14^50 | 2024891623976437135118764865774783290467102632746078437376 | power_of_powers | -| 98 | Quotient of Powers with Same Base | The Quotient of 36^8 and 36^10 = 36^(8-10) = 36^-2 | 0.0007716049382716049 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 2^8 and 45^8 = (2/45)^8 = 0.044444444444444446^8 | 1.5224388403474453e-11 | quotient_of_power_same_power | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 4x^2 + 5x + 1 = 0 | simplified solution : ((-0.25, -1.0)), generalized solution : ((-5 + 3)/2*4, (-5 - 3)/2*4) | complex_quadratic | -| 101 | Leap Year or Not | Year 2018 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 381 minutes to Hours & Minutes | 6 hours and 21 minutes | minutes_to_hours | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 6496 is = | 1960 | decimal_to_bcd | -| 104 | Circumference | Circumference of circle with radius 68 | 427.2566008882119 | circumference | -| 105 | Combine Like terms | 9x^4 + 3x^2 + 5x^3 + 5x^1 + 10x^2 | 5x^1 + 13x^2 + 5x^3 + 9x^4 | combine_like_terms | -| 106 | signum function | signum of -831 is = | -1 | signum_function | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.48% of population have. Test sensitivity (true positive) is equal to SN= 93.80% whereas test specificity (true negative) SP= 90.92%. What is the probability that this guy really has that disease? | 13.43% | conditional_probability | -| 108 | Arc length of Angle | Given radius, 32 and angle, 122. Find the arc length of the angle. | Arc length of the angle = 68.13765 | arc_length | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 35.48% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 11 pistons will contain no more than 4 rejected pistons? | 65.57 | binomial_distribution | -| 110 | Stationary Points | f(x)=2*x^2 + 9*x + 7 | (-9/4,-25/8) | stationary_points | -| 111 | Expanding Factored Binomial | (3x-3)(-1x+2) | -3*x^2+9*x-6 | expanding | -| 112 | Area of Circle | Area of circle with radius 93 | 27182.571428571428 | area_of_circle | +| 13 | Complex Division | 30/91= | 0.33 | complex_division | +| 16 | Fraction Division | (6/8)/(7/2) | 3/14 | divide_fractions | +| 28 | Fraction Multiplication | (8/3)*(2/8) | 2/3 | fraction_multiplication | +| 31 | Factorial | 5! = | 120 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 1/7 and 1/8? | > | compare_fractions | +| 47 | Cube Root | cuberoot of 875 upto 2 decimal places is: | 9.56 | cube_root | +| 53 | Exponentiation | 14^1 = | 14 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -98 and -100 = | 2 | absolute_difference | +| 80 | Percentage of a number | What is 34% of 29? | Required percentage = 9.86% | percentage | +| 90 | isprime | 28 | False | is_prime | +| 97 | Power of Powers | The 6^3^1 = 6^(3*1) = 6^3 | 216 | power_of_powers | +## calculus +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 7 | Power Rule Differentiation | 2x^2 + 5x^3 + 2x^3 + 3x^10 | 4x^1 + 15x^2 + 6x^2 + 30x^9 | power_rule_differentiation | +| 48 | Power Rule Integration | 5x^2 + 5x^1 | (5/2)x^3 + (5/1)x^2 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(exp(x)+7*x^4)/dx | 28*x^3 + exp(x) | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 36x^2 + 57x + 67 is = | 107.5 | definite_integral | +| 110 | Stationary Points | f(x)=10*x^2 + 3*x + 10 | (-3/20,391/40) | stationary_points | +## computer_science +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 4 | Binary Complement 1s | 01100= | 10011 | binary_complement_1s | +| 5 | Modulo Division | 27%45= | 27 | modulo_division | +| 14 | Decimal to Binary | Binary of 30= | 11110 | decimal_to_binary | +| 15 | Binary to Decimal | 0110 | 6 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 18 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 49th Fibonacci number? | 7778742049 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 1010 | 0xa | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of 11 = | 1 | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 541= | 0x21d | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 1868 in Octal is: | 0o3514 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 9 is = | 37220 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 9722 is = | 251510 | decimal_to_bcd | +## geometry +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 18 | Area of Triangle | Area of triangle with side lengths: 19 3 15 = | (1.3716761698165164e-15+22.401171844347786j) | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 13, 6 and 16 exist? | Yes | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 44 and 43 = | 93 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 3 and 18 = | 18.25 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 10 sides | 144.0 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 6m is | 216 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 13m, 9m, 14m is | 850 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 6m and radius = 18m is | 2714 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 6m is | 216 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 17m, 18m, 14m is | 4284 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 27m and radius = 12m is | 12214 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 14m and radius = 3m is | 163 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 29m and radius = 14m is | 5952 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 46 , 142, 29 = | 143 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is cos(90)? | 0 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 10 sides = | 1440 | sum_of_polygon_angles | +| 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 84 m = | 2482712.7095377133 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [649.96, 568.55, 241.36, 319.37, 871.85, 576.19, 912.6, 366.59] and [173.42, 829.66, 374.84, 841.87, 307.24, 844.98, 754.21, 645.43] is: | 0.59 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 40 and angle, 17. Find the area of the sector. | Area of sector = 237.36478 | sector_area | +| 86 | Degrees to Radians | Angle 253 in radians is = | 4.42 | degree_to_rad | +| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 14 and height, 33? | CSA of cylinder = 2902.83 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 12 sided polygon with lengths of [37, 5, 34, 97, 120, 104, 97, 23, 22, 72, 66, 59]cm is: | 736 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 32 | 201.06192982974676 | circumference | +| 108 | Arc length of Angle | Given radius, 31 and angle, 148. Find the arc length of the angle. | Arc length of the angle = 80.07571 | arc_length | +| 112 | Area of Circle | Area of circle with radius 97 | 29571.142857142855 | area_of_circle | +## misc +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 9 | LCM (Least Common Multiple) | LCM of 4 and 7 = | 28 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 15 and 3 = | 3 | gcd | +| 27 | Prime Factorisation | Find prime factors of 161 | [7, 23] | prime_factors | +| 40 | Common Factors | Common Factors of 33 and 28 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 3 and 14 = | 1 | hcf | +| 55 | Comparing surds | Fill in the blanks 43^(1/8) _ 97^(1/6) | < | surds_comparison | +| 63 | Profit or Loss Percent | Profit percent when CP = 303 and SP = 585 is: | 93.06930693069307 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [6, 48, 384, 3072, 24576, 196608] ,Find the value of a,common ratio,7th term value, sum upto 9th term | The value of a is 6, common ratio is 8 , 7th term is 1572864 , sum upto 9th term is 115043766.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 18 , 98 , 77 , 8 = | (18*98*77*8)^(1/4) = 32.28641488711981 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 8 , 70 , 24 , 85 = | 4/((1/8) + (1/70) + (1/24) + (1/85)) = 20.755813953488374 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[288.6870061903637, 830.0059124436957, 80.85289556157238, 32.95804703487859, 290.00911298156007, 267.3996092514439, 723.9393433047015, 973.3386599711184, 151.93863634100845, 18.71003497862489, 445.18946751284307, 678.1683029551084, 191.406649648846, 909.0851387496899, 599.3623170191328, 702.8900903174056, 568.8716699724164, 570.9365552731333] is: | 2335.475196652018 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 45 degrees Celsius to degrees Fahrenheit = | 113.0 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 44 of the AP series: 15, -12, -39 ... | -1146 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 27 terms of the AP series: -100, -51, -2 ... | 14499.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 2662 in Roman Numerals is: | MMDCLXII | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 6.0exp(i3.14) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 3, 5, 6, 8, 9} ,b={2, 4, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 4, 5, 6, 8, 9},Intersection is {6}, a-b is {1, 3, 5, 8, 9},b-a is {2, 4}, Symmetric difference is {1, 2, 3, 4, 5, 8, 9} | set_operation | +| 94 | Base Conversion | Convert CFBE from base 16 to base 6. | 1050114 | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 2^2 and 2^2 = 2^(2-2) = 2^0 | 1 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 31^4 and 13^4 = (31/13)^4 = 2.3846153846153846^4 | 32.335037288610344 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 2022 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 685 minutes to Hours & Minutes | 11 hours and 25 minutes | minutes_to_hours | +| 106 | signum function | signum of 879 is = | 1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 40.94% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 17 pistons will contain no more than 3 rejected pistons? | 3.94 | binomial_distribution | +## statistics +| Id | Skill | Example problem | Example Solution | Function Name | +|------|-------|-----------------|------------------|---------------| +| 30 | Combinations of Objects | Number of combinations from 12 objects picked 0 at a time | 1 | combinations | +| 42 | Permutations | Number of Permutations from 17 objects picked 6 at a time = | 8910720 | permutation | +| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 18 = | 1/216 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [218, 274, 289, 295, 251, 246, 267, 276, 282, 213, 275, 210, 291, 209, 230, 220, 227, 204, 221, 214, 292, 252, 273, 243, 200, 272, 283, 288, 297, 211, 299, 244, 270, 242, 264, 279, 256] with 90% confidence is | (261.7881003640357, 245.07676450082917) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[37, 32, 45, 26, 36, 28, 17, 36, 47, 36, 34, 49, 47, 31, 5] | The Mean is 33.733333333333334 , Standard Deviation is 129.79555555555555, Variance is 11.392785241351456 | data_summary | +| 76 | Mean and Median | Given the series of numbers [73, 80, 8, 39, 9, 85, 51, 54, 14, 57]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 47.0 and Arithmetic median of this series is 52.5 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.87% of population have. Test sensitivity (true positive) is equal to SN= 94.23% whereas test specificity (true negative) SP= 96.61%. What is the probability that this guy really has that disease? | 34.63% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index 5467f8e..ff678e6 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -1,5 +1,6 @@ from mathgenerator.mathgen import * +write_list = [] def array2markdown_table(string): string = string.replace("[[", "
") @@ -12,13 +13,7 @@ def array2markdown_table(string): return string -wList = getGenList() -lines = [] -with open('mathgenerator/mathgen.py', 'r') as f: - lines = f.readlines() - -allRows = [] -for item in wList: +def write_row(item): myGen = item[2] # NOTE: renamed 'sol' to 'solu' to make it look nicer prob, solu = myGen() @@ -35,8 +30,44 @@ for item in wList: # NOTE: renamed 'def_name' to 'func_name' because it suits it more func_name = item[3] row = [myGen.id, myGen.title, prob, solu, func_name] + tableLine = "| " + str(row[0]) + " | " + str(row[1]) + " | " + str( + row[2]) + " | " + str(row[3]) + " | " + str(row[4]) + " |\n" print('added', item[1], '-', func_name, 'to the README.md') - allRows.append(row) + return tableLine + +def make_table_header(name): + lines = [ + '## ' + name + '\n', + '| Id | Skill | Example problem | Example Solution | Function Name |\n', + '|------|-------|-----------------|------------------|---------------|\n' + ] + for line in lines: + write_list.append(line) + +def write_subject_table(subject_name, full_gen_list): + subject_list = [] + # Create list of generators in given subject + for gen in full_gen_list: + if gen[4] == subject_name: + subject_list.append(gen) + subject_list.sort() + + # Create table header + make_table_header(subject_name) + + # Add each item to write_list + for item in subject_list: + write_list.append(write_row(item)) + + +wList = getGenList() +lines = [] +with open('mathgenerator/mathgen.py', 'r') as f: + lines = f.readlines() + +subjects = ['algebra', 'basic_math', 'calculus', 'computer_science', 'geometry', 'misc', 'statistics'] +for subject in subjects: + write_subject_table(subject, wList) with open('README.md', "r") as g: lines = g.readlines() @@ -44,10 +75,8 @@ with open('README.md', "r") as g: line = lines.index('|------|-------|-----------------|------------------|---------------|\n') lines = lines[:line + 1] - for row in allRows: - tableLine = "| " + str(row[0]) + " | " + str(row[1]) + " | " + str( - row[2]) + " | " + str(row[3]) + " | " + str(row[4]) + " |\n" - lines.append(tableLine) + for write_line in write_list: + lines.append(write_line) with open('README.md', "w") as g: g.writelines(lines) diff --git a/mathgenerator/__init__.py b/mathgenerator/__init__.py index b4bfb54..cb899b3 100644 --- a/mathgenerator/__init__.py +++ b/mathgenerator/__init__.py @@ -21,10 +21,10 @@ class Generator: text) = traceback.extract_stack()[-2] funcname = filename[filename.rfind('/'):].strip() funcname = funcname[1:-3] - groupname = filename[:filename.rfind('/')].strip() - groupname = groupname[groupname.rfind('/'):].strip() - groupname = groupname[1:] - genList.append([id, title, self, funcname, groupname]) + subjectname = filename[:filename.rfind('/')].strip() + subjectname = subjectname[subjectname.rfind('/'):].strip() + subjectname = subjectname[1:] + genList.append([id, title, self, funcname, subjectname]) def __str__(self): return str( diff --git a/mathgenerator/funcs/algebra/intersection_of_two_lines.py b/mathgenerator/funcs/algebra/intersection_of_two_lines.py index c53f6be..a8e0f3c 100644 --- a/mathgenerator/funcs/algebra/intersection_of_two_lines.py +++ b/mathgenerator/funcs/algebra/intersection_of_two_lines.py @@ -1,5 +1,6 @@ from .__init__ import * +import fractions def intersectionOfTwoLinesFunc(minM=-10, maxM=10, diff --git a/mathgenerator/funcs/algebra/quadratic_equation.py b/mathgenerator/funcs/algebra/quadratic_equation.py index 5961852..da2860f 100644 --- a/mathgenerator/funcs/algebra/quadratic_equation.py +++ b/mathgenerator/funcs/algebra/quadratic_equation.py @@ -1,5 +1,6 @@ from .__init__ import * +import math def quadraticEquation(maxVal=100): a = random.randint(1, maxVal) diff --git a/mathgenerator/funcs/computer_science/nth_fibonacci_number.py b/mathgenerator/funcs/computer_science/nth_fibonacci_number.py index cfb7e8a..477ff46 100644 --- a/mathgenerator/funcs/computer_science/nth_fibonacci_number.py +++ b/mathgenerator/funcs/computer_science/nth_fibonacci_number.py @@ -1,5 +1,6 @@ from .__init__ import * +import math def nthFibonacciNumberFunc(maxN=100): golden_ratio = (1 + math.sqrt(5)) / 2 diff --git a/mathgenerator/funcs/geometry/arc_length.py b/mathgenerator/funcs/geometry/arc_length.py index d88090e..fdda5e8 100644 --- a/mathgenerator/funcs/geometry/arc_length.py +++ b/mathgenerator/funcs/geometry/arc_length.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def arclengthFunc(maxRadius=49, maxAngle=359): Radius = random.randint(1, maxRadius) diff --git a/mathgenerator/funcs/geometry/basic_trigonometry.py b/mathgenerator/funcs/geometry/basic_trigonometry.py index 2992034..b93365b 100644 --- a/mathgenerator/funcs/geometry/basic_trigonometry.py +++ b/mathgenerator/funcs/geometry/basic_trigonometry.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + # Handles degrees in quadrant one def basicTrigonometryFunc(angles=[0, 30, 45, 60, 90], diff --git a/mathgenerator/funcs/misc/complex_to_polar.py b/mathgenerator/funcs/misc/complex_to_polar.py index ad4798d..f948253 100644 --- a/mathgenerator/funcs/misc/complex_to_polar.py +++ b/mathgenerator/funcs/misc/complex_to_polar.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def complexToPolarFunc(minRealImaginaryNum=-20, maxRealImaginaryNum=20): num = complex(random.randint(minRealImaginaryNum, maxRealImaginaryNum), diff --git a/mathgenerator/funcs/misc/decimal_to_roman_numerals.py b/mathgenerator/funcs/misc/decimal_to_roman_numerals.py index c2470dc..7616f2c 100644 --- a/mathgenerator/funcs/misc/decimal_to_roman_numerals.py +++ b/mathgenerator/funcs/misc/decimal_to_roman_numerals.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def decimalToRomanNumeralsFunc(maxDecimal=4000): x = random.randint(0, maxDecimal) diff --git a/mathgenerator/funcs/misc/euclidian_norm.py b/mathgenerator/funcs/misc/euclidian_norm.py index 017fa74..8cbcf58 100644 --- a/mathgenerator/funcs/misc/euclidian_norm.py +++ b/mathgenerator/funcs/misc/euclidian_norm.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def euclidianNormFunc(maxEltAmt=20): vec = [ diff --git a/mathgenerator/funcs/misc/surds_comparison.py b/mathgenerator/funcs/misc/surds_comparison.py index 7c2825c..ec50c0e 100644 --- a/mathgenerator/funcs/misc/surds_comparison.py +++ b/mathgenerator/funcs/misc/surds_comparison.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def surdsComparisonFunc(maxValue=100, maxRoot=10): radicand1, radicand2 = tuple(random.sample(range(1, maxValue), 2)) diff --git a/mathgenerator/funcs/statistics/confidence_interval.py b/mathgenerator/funcs/statistics/confidence_interval.py index e6cb161..96b2b90 100644 --- a/mathgenerator/funcs/statistics/confidence_interval.py +++ b/mathgenerator/funcs/statistics/confidence_interval.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def confidenceIntervalFunc(): n = random.randint(20, 40) diff --git a/mathgenerator/funcs/statistics/permutation.py b/mathgenerator/funcs/statistics/permutation.py index 63d78a8..5341a88 100644 --- a/mathgenerator/funcs/statistics/permutation.py +++ b/mathgenerator/funcs/statistics/permutation.py @@ -1,5 +1,7 @@ from .__init__ import * +import math + def permutationFunc(maxlength=20): a = random.randint(10, maxlength) From 8ebb7867d63a0fc1a7f5d17b6488d18f9d03a346 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 10:50:18 -0500 Subject: [PATCH 02/10] Fixed extra table heading error --- README.md | 229 +++++++++++++++++++++++++------------------------- makeReadme.py | 2 +- 2 files changed, 114 insertions(+), 117 deletions(-) diff --git a/README.md b/README.md index 713454e..9ecaa49 100644 --- a/README.md +++ b/README.md @@ -45,140 +45,137 @@ mathgen.write_pdf(worksheet) ``` ## List of Generators - -| Id | Skill | Example problem | Example Solution | Function Name | -|------|-------|-----------------|------------------|---------------| ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 8x + 7 = 7 | 0 | basic_algebra | -| 12 | Logarithm | log2(32) | 5 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[10, 4], [7, 0]] = | [[100,40],[70,0]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (-11,1),(20,-20)= | (4.5,-9.5) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+14x+49 | (x+7)(x+7) | factoring | -| 23 | Solve a System of Equations in R^2 | 5x - y = 36, 8x + 7y = 135 | x = 9, y = 9 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (4, -7) and (-17, 21) | sqrt(1225) | distance_two_points | -| 26 | Linear Equations | -16x + 18y = -282, -4x + -14y = 22 | x = 12, y = -5 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 1/3x - 10 and y = -10/4x - 2 | (48/17, -154/17) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [14, 0, 10] X [18, -17, 17] = | [170, -58, -238] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 5365 dollars, 4% rate of interest and for a time period of 1 years is = | 214.6 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
5-9
0-2
-78
and
99-9-3
6-8-98
|
-911736-87
-121618-16
-15-127-985
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 1x^2+15x+17=0 | [-1.24, -13.76] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (17+15j) * (-20-10j) = | (-190-470j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [3, -14, -17] . [6, 16, -11] = | -19 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[38, 76, 13], [27, 97, 60], [32, 17, 71]]) is: | Matrix([[5867/188789, -5175/188789, 3299/188789], [3/188789, 2282/188789, -1929/188789], [-2645/188789, 1786/188789, 1634/188789]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[49, 17], [48, 27]]) = | 507 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 5556 dollars, 6% rate of interest and for a time period of 9 year is = | 9386.75 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 8x + 9 = 0 | simplified solution : ((-1.354, -6.646)), generalized solution : ((-8 + sqrt(28))/2*1, (-8 - sqrt(28))/2*1) | complex_quadratic | -| 105 | Combine Like terms | 9x^8 + 10x^4 + 10x^6 + 10x^2 + 7x^2 + 6x^6 + 5x^5 + 8x^4 + 10x^8 + 7x^1 | 7x^1 + 17x^2 + 18x^4 + 5x^5 + 16x^6 + 19x^8 | combine_like_terms | -| 111 | Expanding Factored Binomial | (-3x-5)(+10x+6) | -30*x^2-68*x-30 | expanding | +| 11 | Basic Algebra | 3x + 9 = 9 | 0 | basic_algebra | +| 12 | Logarithm | log3(6561) | 8 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[8, 6], [7, 3]] = | [[80,60],[70,30]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (3,-15),(-17,1)= | (-7.0,-7.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2-8x+7 | (x-7)(x-1) | factoring | +| 23 | Solve a System of Equations in R^2 | 9x - 9y = -72, -10x - 5y = 20 | x = -4, y = 4 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (0, -14) and (-8, -6) | sqrt(128) | distance_two_points | +| 26 | Linear Equations | -12x + -11y = 138, -1x + -14y = 247 | x = 5, y = -18 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -2/4x + 8 and y = 1x - 8 | (32/3, 8/3) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [7, -3, 11] X [3, -12, -16] = | [180, 145, -75] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 1601 dollars, 2% rate of interest and for a time period of 5 years is = | 160.1 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
10-3-1
-3-1-7
-3-97
581
and
958-5
-1437
-858-1
|
1013363-70
30-54-8315
-74-165-55
29627230
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 96x^2+123x+24=0 | [-0.24, -1.04] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (2-12j) * -10j = | (-120-20j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [-19, -4, 13] . [-11, -2, -9] = | 100 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[59, 45, 48], [15, 9, 31], [29, 51, 17]]) is: | Matrix([[17/370, -561/10360, -321/10360], [-23/1110, 389/31080, 1109/31080], [-3/185, 71/1295, 6/1295]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[55, 69], [58, 66]]) = | -372 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 7423 dollars, 9% rate of interest and for a time period of 1 year is = | 8091.07 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 9x + 7 = 0 | simplified solution : ((-0.86, -8.14)), generalized solution : ((-9 + sqrt(53))/2*1, (-9 - sqrt(53))/2*1) | complex_quadratic | +| 105 | Combine Like terms | 4x^1 + 6x^7 + 4x^9 + 3x^6 + 7x^4 + 6x^9 + 3x^7 + 8x^5 + 3x^2 + 1x^5 | 4x^1 + 3x^2 + 7x^4 + 9x^5 + 3x^6 + 9x^7 + 10x^9 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-5x+10)(-6x-8) | 30*x^2-20*x-80 | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 27+49= | 76 | addition | -| 1 | Subtraction | 32-6= | 26 | subtraction | -| 2 | Multiplication | 36*1= | 36 | multiplication | -| 3 | Division | 450/18= | 25 | division | -| 6 | Square Root | sqrt(1)= | 1 | square_root | -| 8 | Square | 6^2= | 36 | square | -| 13 | Complex Division | 30/91= | 0.33 | complex_division | -| 16 | Fraction Division | (6/8)/(7/2) | 3/14 | divide_fractions | -| 28 | Fraction Multiplication | (8/3)*(2/8) | 2/3 | fraction_multiplication | -| 31 | Factorial | 5! = | 120 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 1/7 and 1/8? | > | compare_fractions | -| 47 | Cube Root | cuberoot of 875 upto 2 decimal places is: | 9.56 | cube_root | -| 53 | Exponentiation | 14^1 = | 14 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -98 and -100 = | 2 | absolute_difference | -| 80 | Percentage of a number | What is 34% of 29? | Required percentage = 9.86% | percentage | -| 90 | isprime | 28 | False | is_prime | -| 97 | Power of Powers | The 6^3^1 = 6^(3*1) = 6^3 | 216 | power_of_powers | +| 0 | Addition | 49+24= | 73 | addition | +| 1 | Subtraction | 90-14= | 76 | subtraction | +| 2 | Multiplication | 65*0= | 0 | multiplication | +| 3 | Division | 153/9= | 17 | division | +| 6 | Square Root | sqrt(121)= | 11 | square_root | +| 8 | Square | 13^2= | 169 | square | +| 13 | Complex Division | 99/25= | 3.96 | complex_division | +| 16 | Fraction Division | (9/5)/(1/10) | 18 | divide_fractions | +| 28 | Fraction Multiplication | (6/1)*(4/9) | 8/3 | fraction_multiplication | +| 31 | Factorial | 4! = | 24 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 2/3 and 1/8? | > | compare_fractions | +| 47 | Cube Root | cuberoot of 431 upto 2 decimal places is: | 7.55 | cube_root | +| 53 | Exponentiation | 16^9 = | 68719476736 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -48 and -85 = | 37 | absolute_difference | +| 80 | Percentage of a number | What is 26% of 50? | Required percentage = 13.00% | percentage | +| 90 | isprime | 71 | True | is_prime | +| 97 | Power of Powers | The 44^5^2 = 44^(5*2) = 44^10 | 27197360938418176 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 2x^2 + 5x^3 + 2x^3 + 3x^10 | 4x^1 + 15x^2 + 6x^2 + 30x^9 | power_rule_differentiation | -| 48 | Power Rule Integration | 5x^2 + 5x^1 | (5/2)x^3 + (5/1)x^2 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(exp(x)+7*x^4)/dx | 28*x^3 + exp(x) | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 36x^2 + 57x + 67 is = | 107.5 | definite_integral | -| 110 | Stationary Points | f(x)=10*x^2 + 3*x + 10 | (-3/20,391/40) | stationary_points | +| 7 | Power Rule Differentiation | 6x^2 + 9x^2 + 2x^8 + 3x^1 | 12x^1 + 18x^1 + 16x^7 + 3x^0 | power_rule_differentiation | +| 48 | Power Rule Integration | 9x^4 + 7x^7 + 6x^6 + 6x^4 | (9/4)x^5 + (7/7)x^8 + (6/6)x^7 + (6/4)x^5 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(sec(x)+4*x^3)/dx | 12*x^2 + tan(x)*sec(x) | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 62x^2 + 2x + 78 is = | 99.6667 | definite_integral | +| 110 | Stationary Points | f(x)=8*x^2 + 7*x + 1 | (-7/16,-17/32) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 01100= | 10011 | binary_complement_1s | -| 5 | Modulo Division | 27%45= | 27 | modulo_division | -| 14 | Decimal to Binary | Binary of 30= | 11110 | decimal_to_binary | -| 15 | Binary to Decimal | 0110 | 6 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 18 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597] | fibonacci_series | -| 62 | nth Fibonacci number | What is the 49th Fibonacci number? | 7778742049 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 1010 | 0xa | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of 11 = | 1 | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 541= | 0x21d | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 1868 in Octal is: | 0o3514 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 9 is = | 37220 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 9722 is = | 251510 | decimal_to_bcd | +| 4 | Binary Complement 1s | 10010001= | 01101110 | binary_complement_1s | +| 5 | Modulo Division | 85%29= | 27 | modulo_division | +| 14 | Decimal to Binary | Binary of 17= | 10001 | decimal_to_binary | +| 15 | Binary to Decimal | 0 | 0 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 20 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 48th Fibonacci number? | 4807526976 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 00 | 0x0 | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of = | | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 280= | 0x118 | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 1994 in Octal is: | 0o3712 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 29299 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 9775 is = | 26215 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 19 3 15 = | (1.3716761698165164e-15+22.401171844347786j) | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 13, 6 and 16 exist? | Yes | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 44 and 43 = | 93 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 3 and 18 = | 18.25 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 10 sides | 144.0 | angle_regular_polygon | -| 32 | Surface Area of Cube | Surface area of cube with side = 6m is | 216 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 13m, 9m, 14m is | 850 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 6m and radius = 18m is | 2714 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 6m is | 216 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 17m, 18m, 14m is | 4284 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 27m and radius = 12m is | 12214 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 14m and radius = 3m is | 163 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 29m and radius = 14m is | 5952 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 46 , 142, 29 = | 143 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is cos(90)? | 0 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 10 sides = | 1440 | sum_of_polygon_angles | -| 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 84 m = | 2482712.7095377133 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [649.96, 568.55, 241.36, 319.37, 871.85, 576.19, 912.6, 366.59] and [173.42, 829.66, 374.84, 841.87, 307.24, 844.98, 754.21, 645.43] is: | 0.59 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 40 and angle, 17. Find the area of the sector. | Area of sector = 237.36478 | sector_area | -| 86 | Degrees to Radians | Angle 253 in radians is = | 4.42 | degree_to_rad | -| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 14 and height, 33? | CSA of cylinder = 2902.83 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 12 sided polygon with lengths of [37, 5, 34, 97, 120, 104, 97, 23, 22, 72, 66, 59]cm is: | 736 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 32 | 201.06192982974676 | circumference | -| 108 | Arc length of Angle | Given radius, 31 and angle, 148. Find the arc length of the angle. | Arc length of the angle = 80.07571 | arc_length | -| 112 | Area of Circle | Area of circle with radius 97 | 29571.142857142855 | area_of_circle | +| 18 | Area of Triangle | Area of triangle with side lengths: 18 18 16 = | 128.9961239727768 | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 48, 40 and 48 exist? | Yes | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 31 and 7 = | 142 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 16 and 6 = | 17.09 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 12 sides | 150.0 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 1m is | 6 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 9m, 7m, 6m is | 318 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 20m and radius = 19m is | 4655 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 10m is | 1000 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 16m, 4m, 11m is | 704 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 18m and radius = 13m is | 9556 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 45m and radius = 19m is | 4049 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 38m and radius = 12m is | 5730 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 90 , 59, 150 = | 61 | fourth_angle_of_quadrilateral | +| 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 | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 15m is | 2827.4333882308138 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 96 m = | 3705973.4906218923 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [848.07, 542.12, 669.74, 765.58, 540.05, 31.8, 476.27, 305.45, 148.71, 605.96, 538.21, 613.01, 342.15, 762.78, 849.08, 888.04, 229.57, 673.21, 522.35, 55.69] and [373.43, 892.36, 108.8, 171.3, 283.51, 791.0, 268.17, 870.8, 351.92, 923.46, 732.98, 290.93, 613.57, 487.0, 623.97, 840.61, 901.9, 176.05, 859.64, 227.87] is: | 0.7 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 33 and angle, 218. Find the area of the sector. | Area of sector = 2071.72328 | sector_area | +| 86 | Degrees to Radians | Angle 237 in radians is = | 4.14 | degree_to_rad | +| 87 | Radians to Degrees | Angle 2 in degrees is = | 114.59 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 5 and height, 31? | CSA of cylinder = 973.89 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 7 sided polygon with lengths of [98, 54, 9, 78, 1, 106, 36]cm is: | 382 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 93 | 584.3362335677015 | circumference | +| 108 | Arc length of Angle | Given radius, 25 and angle, 190. Find the arc length of the angle. | Arc length of the angle = 82.90314 | arc_length | +| 112 | Area of Circle | Area of circle with radius 34 | 3633.1428571428573 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 4 and 7 = | 28 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 15 and 3 = | 3 | gcd | -| 27 | Prime Factorisation | Find prime factors of 161 | [7, 23] | prime_factors | -| 40 | Common Factors | Common Factors of 33 and 28 = | [1] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 3 and 14 = | 1 | hcf | -| 55 | Comparing surds | Fill in the blanks 43^(1/8) _ 97^(1/6) | < | surds_comparison | -| 63 | Profit or Loss Percent | Profit percent when CP = 303 and SP = 585 is: | 93.06930693069307 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [6, 48, 384, 3072, 24576, 196608] ,Find the value of a,common ratio,7th term value, sum upto 9th term | The value of a is 6, common ratio is 8 , 7th term is 1572864 , sum upto 9th term is 115043766.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 18 , 98 , 77 , 8 = | (18*98*77*8)^(1/4) = 32.28641488711981 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 8 , 70 , 24 , 85 = | 4/((1/8) + (1/70) + (1/24) + (1/85)) = 20.755813953488374 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[288.6870061903637, 830.0059124436957, 80.85289556157238, 32.95804703487859, 290.00911298156007, 267.3996092514439, 723.9393433047015, 973.3386599711184, 151.93863634100845, 18.71003497862489, 445.18946751284307, 678.1683029551084, 191.406649648846, 909.0851387496899, 599.3623170191328, 702.8900903174056, 568.8716699724164, 570.9365552731333] is: | 2335.475196652018 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 45 degrees Celsius to degrees Fahrenheit = | 113.0 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 44 of the AP series: 15, -12, -39 ... | -1146 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 27 terms of the AP series: -100, -51, -2 ... | 14499.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 2662 in Roman Numerals is: | MMDCLXII | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 6.0exp(i3.14) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 3, 5, 6, 8, 9} ,b={2, 4, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 4, 5, 6, 8, 9},Intersection is {6}, a-b is {1, 3, 5, 8, 9},b-a is {2, 4}, Symmetric difference is {1, 2, 3, 4, 5, 8, 9} | set_operation | -| 94 | Base Conversion | Convert CFBE from base 16 to base 6. | 1050114 | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 2^2 and 2^2 = 2^(2-2) = 2^0 | 1 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 31^4 and 13^4 = (31/13)^4 = 2.3846153846153846^4 | 32.335037288610344 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 2022 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 685 minutes to Hours & Minutes | 11 hours and 25 minutes | minutes_to_hours | -| 106 | signum function | signum of 879 is = | 1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 40.94% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 17 pistons will contain no more than 3 rejected pistons? | 3.94 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 17 and 1 = | 17 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 16 and 9 = | 1 | gcd | +| 27 | Prime Factorisation | Find prime factors of 86 | [2, 43] | prime_factors | +| 40 | Common Factors | Common Factors of 38 and 100 = | [1, 2] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 12 and 9 = | 3 | hcf | +| 55 | Comparing surds | Fill in the blanks 6^(1/4) _ 88^(1/1) | < | surds_comparison | +| 63 | Profit or Loss Percent | Profit percent when CP = 847 and SP = 880 is: | 3.896103896103896 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [12, 84, 588, 4116, 28812, 201684] ,Find the value of a,common ratio,7th term value, sum upto 6th term | The value of a is 12, common ratio is 7 , 7th term is 1411788 , sum upto 6th term is 235296.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 72 , 93 , 63 , 5 = | (72*93*63*5)^(1/4) = 38.10934633766355 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 68 , 62 and 32 = | 3/((1/68) + (1/62) + (1/32)) = 48.32091690544412 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[696.4519852852237, 658.9333146828044, 483.3976903342588, 222.67348281350618] is: | 1096.5834614726732 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 73 degrees Celsius to degrees Fahrenheit = | 163.4 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 21 of the AP series: -65, 14, 93 ... | 1515 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 49 terms of the AP series: -84, -125, -166 ... | -52332.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 1119 in Roman Numerals is: | MCXIX | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 13.0exp(i-1.18) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 2, 4, 5, 6, 7, 8} ,b={1, 5, 6, 8, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 4, 5, 6, 7, 8, 9, 10},Intersection is {8, 1, 5, 6}, a-b is {2, 4, 7},b-a is {9, 10}, Symmetric difference is {2, 4, 7, 9, 10} | set_operation | +| 94 | Base Conversion | Convert 9E4F from base 16 to base 15. | C01C | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 37^6 and 37^7 = 37^(6-7) = 37^-1 | 0.02702702702702703 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 50^2 and 11^2 = (50/11)^2 = 4.545454545454546^2 | 20.661157024793393 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 1933 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 563 minutes to Hours & Minutes | 9 hours and 23 minutes | minutes_to_hours | +| 106 | signum function | signum of -584 is = | -1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 32.97% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 12 pistons will contain no more than 9 rejected pistons? | 99.95 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 12 objects picked 0 at a time | 1 | combinations | -| 42 | Permutations | Number of Permutations from 17 objects picked 6 at a time = | 8910720 | permutation | -| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 18 = | 1/216 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [218, 274, 289, 295, 251, 246, 267, 276, 282, 213, 275, 210, 291, 209, 230, 220, 227, 204, 221, 214, 292, 252, 273, 243, 200, 272, 283, 288, 297, 211, 299, 244, 270, 242, 264, 279, 256] with 90% confidence is | (261.7881003640357, 245.07676450082917) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[37, 32, 45, 26, 36, 28, 17, 36, 47, 36, 34, 49, 47, 31, 5] | The Mean is 33.733333333333334 , Standard Deviation is 129.79555555555555, Variance is 11.392785241351456 | data_summary | -| 76 | Mean and Median | Given the series of numbers [73, 80, 8, 39, 9, 85, 51, 54, 14, 57]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 47.0 and Arithmetic median of this series is 52.5 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.87% of population have. Test sensitivity (true positive) is equal to SN= 94.23% whereas test specificity (true negative) SP= 96.61%. What is the probability that this guy really has that disease? | 34.63% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 15 objects picked 5 at a time | 3003 | combinations | +| 42 | Permutations | Number of Permutations from 14 objects picked 7 at a time = | 17297280 | permutation | +| 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 5 = | 1/6 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [274, 205, 285, 208, 269, 231, 246, 238, 212, 278, 266, 270, 243, 297, 295, 283, 249, 296, 279, 294, 255, 277, 239, 245, 203, 288, 287, 253] with 80% confidence is | (266.4148171763757, 252.51375425219572) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[26, 34, 33, 32, 45, 26, 50, 42, 40, 15, 5, 48, 48, 11, 6] | The Mean is 30.733333333333334 , Standard Deviation is 223.79555555555558, Variance is 14.959797978433919 | data_summary | +| 76 | Mean and Median | Given the series of numbers [43, 48, 78, 71, 82, 32, 49, 26, 76, 3]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 50.8 and Arithmetic median of this series is 48.5 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.48% of population have. Test sensitivity (true positive) is equal to SN= 98.64% whereas test specificity (true negative) SP= 94.56%. What is the probability that this guy really has that disease? | 21.41% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index ff678e6..11c0ead 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -72,7 +72,7 @@ for subject in subjects: with open('README.md', "r") as g: lines = g.readlines() - line = lines.index('|------|-------|-----------------|------------------|---------------|\n') + line = lines.index('## List of Generators\n') lines = lines[:line + 1] for write_line in write_list: From 51f970f6f570fa88462c7235bf389ca73040d625 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:08:32 -0500 Subject: [PATCH 03/10] Added table of contents generation --- README.md | 237 ++++++++++++++++++++++++++------------------------ makeReadme.py | 36 +++++++- 2 files changed, 158 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index 9ecaa49..31594a6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,19 @@ To try out generators, go to If you have an idea for a generator, please add it as an issue and tag it with the "New Generator" label. -## Usage +## Table of Contents +* [Usage](Usage) +* [Basic Documentation](basic-documentation) +* [List of Generators](list-of-generators) + * [algebra](#algebra) + * [basic_math](#basic_math) + * [calculus](#calculus) + * [computer_science](#computer_science) + * [geometry](#geometry) + * [misc](#misc) + * [statistics](#statistics) + +## Installation The project can be install via pip @@ -14,6 +26,7 @@ The project can be install via pip pip install mathgenerator ``` +## Basic Usage Here is an example of how you would generate an addition problem: ```python @@ -48,134 +61,134 @@ mathgen.write_pdf(worksheet) ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 3x + 9 = 9 | 0 | basic_algebra | -| 12 | Logarithm | log3(6561) | 8 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[8, 6], [7, 3]] = | [[80,60],[70,30]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (3,-15),(-17,1)= | (-7.0,-7.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2-8x+7 | (x-7)(x-1) | factoring | -| 23 | Solve a System of Equations in R^2 | 9x - 9y = -72, -10x - 5y = 20 | x = -4, y = 4 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (0, -14) and (-8, -6) | sqrt(128) | distance_two_points | -| 26 | Linear Equations | -12x + -11y = 138, -1x + -14y = 247 | x = 5, y = -18 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -2/4x + 8 and y = 1x - 8 | (32/3, 8/3) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [7, -3, 11] X [3, -12, -16] = | [180, 145, -75] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 1601 dollars, 2% rate of interest and for a time period of 5 years is = | 160.1 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
10-3-1
-3-1-7
-3-97
581
and
958-5
-1437
-858-1
|
1013363-70
30-54-8315
-74-165-55
29627230
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 96x^2+123x+24=0 | [-0.24, -1.04] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (2-12j) * -10j = | (-120-20j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [-19, -4, 13] . [-11, -2, -9] = | 100 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[59, 45, 48], [15, 9, 31], [29, 51, 17]]) is: | Matrix([[17/370, -561/10360, -321/10360], [-23/1110, 389/31080, 1109/31080], [-3/185, 71/1295, 6/1295]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[55, 69], [58, 66]]) = | -372 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 7423 dollars, 9% rate of interest and for a time period of 1 year is = | 8091.07 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation x^2 + 9x + 7 = 0 | simplified solution : ((-0.86, -8.14)), generalized solution : ((-9 + sqrt(53))/2*1, (-9 - sqrt(53))/2*1) | complex_quadratic | -| 105 | Combine Like terms | 4x^1 + 6x^7 + 4x^9 + 3x^6 + 7x^4 + 6x^9 + 3x^7 + 8x^5 + 3x^2 + 1x^5 | 4x^1 + 3x^2 + 7x^4 + 9x^5 + 3x^6 + 9x^7 + 10x^9 | combine_like_terms | -| 111 | Expanding Factored Binomial | (-5x+10)(-6x-8) | 30*x^2-20*x-80 | expanding | +| 11 | Basic Algebra | 10x + 1 = 10 | 9/10 | basic_algebra | +| 12 | Logarithm | log3(81) | 4 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[1, 8], [10, 2]] = | [[10,80],[100,20]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (-11,2),(12,-16)= | (0.5,-7.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+5x-14 | (x+7)(x-2) | factoring | +| 23 | Solve a System of Equations in R^2 | -7x - 4y = -20, 4x - 6y = 28 | x = 4, y = -2 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (-11, -17) and (0, -8) | sqrt(202) | distance_two_points | +| 26 | Linear Equations | -10x + -18y = -404, 12x + -13y = -138 | x = 8, y = 18 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 9/5x + 3 and y = 6/5x + 7 | (20/3, 15) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [-15, -13, -4] X [14, 1, -9] = | [121, -191, 167] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 3163 dollars, 4% rate of interest and for a time period of 8 years is = | 1012.16 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
-10-100
-1-10-9
271
and
-7-8
4-1
8-3
|
3090
-10545
22-26
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 40x^2+179x+77=0 | [-0.48, -3.99] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (-3-9j) * (-17+8j) = | (123+129j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [-13, -9, 8] . [-8, -14, -10] = | 150 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[69, 83, 5], [16, 53, 63], [26, 74, 97]]) is: | Matrix([[479/39219, -7681/39219, 292/2307], [86/39219, 6563/39219, -251/2307], [-194/39219, -2948/39219, 137/2307]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[25, 64], [52, 79]]) = | -1353 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 9974 dollars, 4% rate of interest and for a time period of 1 year is = | 10372.96 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 3x^2 + 9x + 4 = 0 | simplified solution : ((-0.543, -2.457)), generalized solution : ((-9 + sqrt(33))/2*3, (-9 - sqrt(33))/2*3) | complex_quadratic | +| 105 | Combine Like terms | 9x^3 + 10x^7 + 1x^6 + 9x^3 + 5x^4 + 1x^2 + 9x^5 + 2x^2 | 3x^2 + 18x^3 + 5x^4 + 9x^5 + 1x^6 + 10x^7 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-7x+3)(-5x) | 35*x^2-15*x | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 49+24= | 73 | addition | -| 1 | Subtraction | 90-14= | 76 | subtraction | -| 2 | Multiplication | 65*0= | 0 | multiplication | -| 3 | Division | 153/9= | 17 | division | -| 6 | Square Root | sqrt(121)= | 11 | square_root | -| 8 | Square | 13^2= | 169 | square | -| 13 | Complex Division | 99/25= | 3.96 | complex_division | -| 16 | Fraction Division | (9/5)/(1/10) | 18 | divide_fractions | -| 28 | Fraction Multiplication | (6/1)*(4/9) | 8/3 | fraction_multiplication | -| 31 | Factorial | 4! = | 24 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 2/3 and 1/8? | > | compare_fractions | -| 47 | Cube Root | cuberoot of 431 upto 2 decimal places is: | 7.55 | cube_root | -| 53 | Exponentiation | 16^9 = | 68719476736 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -48 and -85 = | 37 | absolute_difference | -| 80 | Percentage of a number | What is 26% of 50? | Required percentage = 13.00% | percentage | -| 90 | isprime | 71 | True | is_prime | -| 97 | Power of Powers | The 44^5^2 = 44^(5*2) = 44^10 | 27197360938418176 | power_of_powers | +| 0 | Addition | 44+29= | 73 | addition | +| 1 | Subtraction | 20-6= | 14 | subtraction | +| 2 | Multiplication | 37*2= | 74 | multiplication | +| 3 | Division | 322/23= | 14 | division | +| 6 | Square Root | sqrt(144)= | 12 | square_root | +| 8 | Square | 18^2= | 324 | square | +| 13 | Complex Division | 20/25= | 0.8 | complex_division | +| 16 | Fraction Division | (2/1)/(2/9) | 9 | divide_fractions | +| 28 | Fraction Multiplication | (10/6)*(10/3) | 50/9 | fraction_multiplication | +| 31 | Factorial | 6! = | 720 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 2/8 and 10/2? | < | compare_fractions | +| 47 | Cube Root | cuberoot of 343 upto 2 decimal places is: | 7.0 | cube_root | +| 53 | Exponentiation | 10^7 = | 10000000 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -7 and -5 = | 2 | absolute_difference | +| 80 | Percentage of a number | What is 93% of 68? | Required percentage = 63.24% | percentage | +| 90 | isprime | 60 | False | is_prime | +| 97 | Power of Powers | The 17^2^5 = 17^(2*5) = 17^10 | 2015993900449 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 6x^2 + 9x^2 + 2x^8 + 3x^1 | 12x^1 + 18x^1 + 16x^7 + 3x^0 | power_rule_differentiation | -| 48 | Power Rule Integration | 9x^4 + 7x^7 + 6x^6 + 6x^4 | (9/4)x^5 + (7/7)x^8 + (6/6)x^7 + (6/4)x^5 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(sec(x)+4*x^3)/dx | 12*x^2 + tan(x)*sec(x) | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 62x^2 + 2x + 78 is = | 99.6667 | definite_integral | -| 110 | Stationary Points | f(x)=8*x^2 + 7*x + 1 | (-7/16,-17/32) | stationary_points | +| 7 | Power Rule Differentiation | 9x^5 | 45x^4 | power_rule_differentiation | +| 48 | Power Rule Integration | 10x^10 + 8x^10 + 7x^6 | (10/10)x^11 + (8/10)x^11 + (7/6)x^7 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(sec(x)+7*x^(-2))/dx | tan(x)*sec(x) - 14/x^3 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 63x^2 + 37x + 60 is = | 99.5 | definite_integral | +| 110 | Stationary Points | f(x)=3*x^3 + 5*x^2 | (-10/9,500/243),(0,0) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 10010001= | 01101110 | binary_complement_1s | -| 5 | Modulo Division | 85%29= | 27 | modulo_division | -| 14 | Decimal to Binary | Binary of 17= | 10001 | decimal_to_binary | -| 15 | Binary to Decimal | 0 | 0 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 20 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181] | fibonacci_series | +| 4 | Binary Complement 1s | 00100100= | 11011011 | binary_complement_1s | +| 5 | Modulo Division | 48%40= | 8 | modulo_division | +| 14 | Decimal to Binary | Binary of 2= | 10 | decimal_to_binary | +| 15 | Binary to Decimal | 11101 | 29 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 11 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] | fibonacci_series | | 62 | nth Fibonacci number | What is the 48th Fibonacci number? | 4807526976 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 00 | 0x0 | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of = | | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 280= | 0x118 | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 1994 in Octal is: | 0o3712 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 29299 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 9775 is = | 26215 | decimal_to_bcd | +| 64 | Binary to Hexidecimal | 00110100 | 0x34 | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of 11000000 = | 1000000 | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 943= | 0x3af | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 1630 in Octal is: | 0o3136 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 8 is = | 34644 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 5077 is = | 13135 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 18 18 16 = | 128.9961239727768 | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 48, 40 and 48 exist? | Yes | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 31 and 7 = | 142 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 16 and 6 = | 17.09 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 12 sides | 150.0 | angle_regular_polygon | -| 32 | Surface Area of Cube | Surface area of cube with side = 1m is | 6 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 9m, 7m, 6m is | 318 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 20m and radius = 19m is | 4655 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 10m is | 1000 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 16m, 4m, 11m is | 704 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 18m and radius = 13m is | 9556 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 45m and radius = 19m is | 4049 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 38m and radius = 12m is | 5730 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 90 , 59, 150 = | 61 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is sin(60)? | √3/2 | basic_trigonometry | +| 18 | Area of Triangle | Area of triangle with side lengths: 13 2 7 = | (1.723230794081419e-15+28.142494558940577j) | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 10, 48 and 21 exist? | No | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 24 and 76 = | 80 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 19 and 8 = | 20.62 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 11 sides | 147.27 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 6m is | 216 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 15m, 14m, 13m is | 1174 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 24m and radius = 8m is | 1608 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 = 15m, 16m, 9m is | 2160 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 48m and radius = 4m is | 2412 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 41m and radius = 1m is | 131 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 1m and radius = 13m is | 176 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 153 , 48, 31 = | 128 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is cos(90)? | 0 | basic_trigonometry | | 58 | Sum of Angles of Polygon | Sum of angles of polygon with 6 sides = | 720 | sum_of_polygon_angles | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 15m is | 2827.4333882308138 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 96 m = | 3705973.4906218923 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [848.07, 542.12, 669.74, 765.58, 540.05, 31.8, 476.27, 305.45, 148.71, 605.96, 538.21, 613.01, 342.15, 762.78, 849.08, 888.04, 229.57, 673.21, 522.35, 55.69] and [373.43, 892.36, 108.8, 171.3, 283.51, 791.0, 268.17, 870.8, 351.92, 923.46, 732.98, 290.93, 613.57, 487.0, 623.97, 840.61, 901.9, 176.05, 859.64, 227.87] is: | 0.7 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 33 and angle, 218. Find the area of the sector. | Area of sector = 2071.72328 | sector_area | -| 86 | Degrees to Radians | Angle 237 in radians is = | 4.14 | degree_to_rad | -| 87 | Radians to Degrees | Angle 2 in degrees is = | 114.59 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 5 and height, 31? | CSA of cylinder = 973.89 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 7 sided polygon with lengths of [98, 54, 9, 78, 1, 106, 36]cm is: | 382 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 93 | 584.3362335677015 | circumference | -| 108 | Arc length of Angle | Given radius, 25 and angle, 190. Find the arc length of the angle. | Arc length of the angle = 82.90314 | arc_length | -| 112 | Area of Circle | Area of circle with radius 34 | 3633.1428571428573 | area_of_circle | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 8m is | 804.247719318987 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 71 m = | 1499214.0909853016 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [515.22, 683.73, 303.04] and [503.08, 698.99, 749.7] is: | 0.38 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 26 and angle, 63. Find the area of the sector. | Area of sector = 371.65041 | sector_area | +| 86 | Degrees to Radians | Angle 110 in radians is = | 1.92 | degree_to_rad | +| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 36 and height, 49? | CSA of cylinder = 11083.54 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 5 sided polygon with lengths of [47, 53, 3, 94, 41]cm is: | 238 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 30 | 188.49555921538757 | circumference | +| 108 | Arc length of Angle | Given radius, 46 and angle, 136. Find the arc length of the angle. | Arc length of the angle = 109.18780 | arc_length | +| 112 | Area of Circle | Area of circle with radius 24 | 1810.2857142857142 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 17 and 1 = | 17 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 16 and 9 = | 1 | gcd | -| 27 | Prime Factorisation | Find prime factors of 86 | [2, 43] | prime_factors | -| 40 | Common Factors | Common Factors of 38 and 100 = | [1, 2] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 12 and 9 = | 3 | hcf | -| 55 | Comparing surds | Fill in the blanks 6^(1/4) _ 88^(1/1) | < | surds_comparison | -| 63 | Profit or Loss Percent | Profit percent when CP = 847 and SP = 880 is: | 3.896103896103896 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [12, 84, 588, 4116, 28812, 201684] ,Find the value of a,common ratio,7th term value, sum upto 6th term | The value of a is 12, common ratio is 7 , 7th term is 1411788 , sum upto 6th term is 235296.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 72 , 93 , 63 , 5 = | (72*93*63*5)^(1/4) = 38.10934633766355 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 68 , 62 and 32 = | 3/((1/68) + (1/62) + (1/32)) = 48.32091690544412 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[696.4519852852237, 658.9333146828044, 483.3976903342588, 222.67348281350618] is: | 1096.5834614726732 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 73 degrees Celsius to degrees Fahrenheit = | 163.4 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 21 of the AP series: -65, 14, 93 ... | 1515 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 49 terms of the AP series: -84, -125, -166 ... | -52332.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 1119 in Roman Numerals is: | MCXIX | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 13.0exp(i-1.18) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 2, 4, 5, 6, 7, 8} ,b={1, 5, 6, 8, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 4, 5, 6, 7, 8, 9, 10},Intersection is {8, 1, 5, 6}, a-b is {2, 4, 7},b-a is {9, 10}, Symmetric difference is {2, 4, 7, 9, 10} | set_operation | -| 94 | Base Conversion | Convert 9E4F from base 16 to base 15. | C01C | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 37^6 and 37^7 = 37^(6-7) = 37^-1 | 0.02702702702702703 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 50^2 and 11^2 = (50/11)^2 = 4.545454545454546^2 | 20.661157024793393 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 1933 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 563 minutes to Hours & Minutes | 9 hours and 23 minutes | minutes_to_hours | -| 106 | signum function | signum of -584 is = | -1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 32.97% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 12 pistons will contain no more than 9 rejected pistons? | 99.95 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 5 and 1 = | 5 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 17 and 5 = | 1 | gcd | +| 27 | Prime Factorisation | Find prime factors of 43 | [43] | prime_factors | +| 40 | Common Factors | Common Factors of 100 and 43 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 19 and 8 = | 1 | hcf | +| 55 | Comparing surds | Fill in the blanks 21^(1/2) _ 74^(1/1) | < | surds_comparison | +| 63 | Profit or Loss Percent | Profit percent when CP = 583 and SP = 985 is: | 68.95368782161235 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [8, 48, 288, 1728, 10368, 62208] ,Find the value of a,common ratio,7th term value, sum upto 11th term | The value of a is 8, common ratio is 6 , 7th term is 373248 , sum upto 11th term is 580475288.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 64 , 32 and 73 = | (64*32*73)^(1/3) = 53.074299494939964 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 82 , 34 and 66 = | 3/((1/82) + (1/34) + (1/66)) = 52.855610877058595 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[232.9350882815303, 335.2563860261166, 506.63279598159386, 4.115597138930505, 459.81390060105355, 678.3362850124494, 907.3819064859937, 636.8110397295957, 20.43113538894692, 779.147081565477, 572.3940764483918, 803.6488004919244] is: | 1976.0471832445305 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 100 degrees Celsius to degrees Fahrenheit = | 212.0 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 73 of the AP series: -96, -76, -56 ... | 1344 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 98 terms of the AP series: -4, -55, -106 ... | -242795.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 809 in Roman Numerals is: | DCCCIX | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 15.26exp(i2.12) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 2, 7} ,b={1, 2, 3, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 6, 7},Intersection is {1, 2}, a-b is {7},b-a is {3, 6}, Symmetric difference is {3, 6, 7} | set_operation | +| 94 | Base Conversion | Convert 10212220 from base 3 to base 15. | C8C | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 9^10 and 9^5 = 9^(10-5) = 9^5 | 59049 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 43^2 and 13^2 = (43/13)^2 = 3.3076923076923075^2 | 10.940828402366863 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 1993 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 838 minutes to Hours & Minutes | 13 hours and 58 minutes | minutes_to_hours | +| 106 | signum function | signum of 492 is = | 1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 37.97% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 18 pistons will contain no more than 2 rejected pistons? | 1.28 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 15 objects picked 5 at a time | 3003 | combinations | -| 42 | Permutations | Number of Permutations from 14 objects picked 7 at a time = | 17297280 | permutation | -| 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 5 = | 1/6 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [274, 205, 285, 208, 269, 231, 246, 238, 212, 278, 266, 270, 243, 297, 295, 283, 249, 296, 279, 294, 255, 277, 239, 245, 203, 288, 287, 253] with 80% confidence is | (266.4148171763757, 252.51375425219572) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[26, 34, 33, 32, 45, 26, 50, 42, 40, 15, 5, 48, 48, 11, 6] | The Mean is 30.733333333333334 , Standard Deviation is 223.79555555555558, Variance is 14.959797978433919 | data_summary | -| 76 | Mean and Median | Given the series of numbers [43, 48, 78, 71, 82, 32, 49, 26, 76, 3]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 50.8 and Arithmetic median of this series is 48.5 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.48% of population have. Test sensitivity (true positive) is equal to SN= 98.64% whereas test specificity (true negative) SP= 94.56%. What is the probability that this guy really has that disease? | 21.41% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 17 objects picked 2 at a time | 136 | combinations | +| 42 | Permutations | Number of Permutations from 20 objects picked 6 at a time = | 27907200 | permutation | +| 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 3 = | 1/6 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [201, 225, 283, 208, 275, 259, 270, 211, 202, 257, 299, 215, 276, 238, 209, 206, 216, 265, 249, 252, 278, 292, 210, 274, 200, 217, 241, 247, 297, 221, 272, 242, 254, 293, 214, 250, 230, 262, 294, 212] with 80% confidence is | (251.69255044389794, 239.10744955610207) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[12, 42, 30, 24, 38, 23, 40, 21, 15, 18, 13, 7, 41, 39, 40] | The Mean is 26.866666666666667 , Standard Deviation is 142.6488888888889, Variance is 11.943571027497969 | data_summary | +| 76 | Mean and Median | Given the series of numbers [9, 42, 63, 56, 19, 30, 97, 8, 40, 94]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 45.8 and Arithmetic median of this series is 41.0 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.56% of population have. Test sensitivity (true positive) is equal to SN= 98.38% whereas test specificity (true negative) SP= 94.57%. What is the probability that this guy really has that disease? | 22.31% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index 11c0ead..6fd4c9d 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -1,6 +1,7 @@ from mathgenerator.mathgen import * write_list = [] +subjects = ['algebra', 'basic_math', 'calculus', 'computer_science', 'geometry', 'misc', 'statistics'] def array2markdown_table(string): string = string.replace("[[", "
") @@ -12,6 +13,36 @@ def array2markdown_table(string): string = string.replace("\n", "") return string +def write_table_of_contents(): + lines = [] + + tc_lines = [ + '* [Usage](Usage)\n', + '* [Basic Documentation](basic-documentation)\n', + '* [List of Generators](list-of-generators)\n', + ] + for subject in subjects: + line = ' * [' + subject + '](#' + subject + ')\n' + tc_lines.append(line) + + with open('README.md', "r") as g: + lines = g.readlines() + + upper_bound = lines.index('## Table of Contents\n') + upper_lines = lines[:upper_bound + 1] + lower_bound = lines.index('## Installation\n') + lower_lines = lines[lower_bound - 1:] + lines = [] + + for upper_line in upper_lines: + lines.append(upper_line) + for tc_line in tc_lines: + lines.append(tc_line) + for lower_line in lower_lines: + lines.append(lower_line) + + with open('README.md', "w") as g: + g.writelines(lines) def write_row(item): myGen = item[2] @@ -62,10 +93,9 @@ def write_subject_table(subject_name, full_gen_list): wList = getGenList() lines = [] -with open('mathgenerator/mathgen.py', 'r') as f: - lines = f.readlines() -subjects = ['algebra', 'basic_math', 'calculus', 'computer_science', 'geometry', 'misc', 'statistics'] +write_table_of_contents() + for subject in subjects: write_subject_table(subject, wList) From 74cc198a5bf1f0cb513a7de8e6b24e5b60cf5997 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:09:18 -0500 Subject: [PATCH 04/10] fix table of contents references --- makeReadme.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/makeReadme.py b/makeReadme.py index 6fd4c9d..e90f438 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -17,9 +17,9 @@ def write_table_of_contents(): lines = [] tc_lines = [ - '* [Usage](Usage)\n', - '* [Basic Documentation](basic-documentation)\n', - '* [List of Generators](list-of-generators)\n', + '* [Usage](#Usage)\n', + '* [Basic Documentation](#basic-documentation)\n', + '* [List of Generators](#list-of-generators)\n', ] for subject in subjects: line = ' * [' + subject + '](#' + subject + ')\n' From 5ed2fe0ae4077e37b320f9015d665240505c54d6 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:09:29 -0500 Subject: [PATCH 05/10] update readme --- README.md | 232 +++++++++++++++++++++++++++--------------------------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index 31594a6..c42fea9 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ To try out generators, go to If you have an idea for a generator, please add it as an issue and tag it with the "New Generator" label. ## Table of Contents -* [Usage](Usage) -* [Basic Documentation](basic-documentation) -* [List of Generators](list-of-generators) +* [Usage](#Usage) +* [Basic Documentation](#basic-documentation) +* [List of Generators](#list-of-generators) * [algebra](#algebra) * [basic_math](#basic_math) * [calculus](#calculus) @@ -61,134 +61,134 @@ mathgen.write_pdf(worksheet) ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 10x + 1 = 10 | 9/10 | basic_algebra | -| 12 | Logarithm | log3(81) | 4 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[1, 8], [10, 2]] = | [[10,80],[100,20]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (-11,2),(12,-16)= | (0.5,-7.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+5x-14 | (x+7)(x-2) | factoring | -| 23 | Solve a System of Equations in R^2 | -7x - 4y = -20, 4x - 6y = 28 | x = 4, y = -2 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (-11, -17) and (0, -8) | sqrt(202) | distance_two_points | -| 26 | Linear Equations | -10x + -18y = -404, 12x + -13y = -138 | x = 8, y = 18 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 9/5x + 3 and y = 6/5x + 7 | (20/3, 15) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [-15, -13, -4] X [14, 1, -9] = | [121, -191, 167] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 3163 dollars, 4% rate of interest and for a time period of 8 years is = | 1012.16 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
-10-100
-1-10-9
271
and
-7-8
4-1
8-3
|
3090
-10545
22-26
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 40x^2+179x+77=0 | [-0.48, -3.99] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (-3-9j) * (-17+8j) = | (123+129j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [-13, -9, 8] . [-8, -14, -10] = | 150 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[69, 83, 5], [16, 53, 63], [26, 74, 97]]) is: | Matrix([[479/39219, -7681/39219, 292/2307], [86/39219, 6563/39219, -251/2307], [-194/39219, -2948/39219, 137/2307]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[25, 64], [52, 79]]) = | -1353 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 9974 dollars, 4% rate of interest and for a time period of 1 year is = | 10372.96 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 3x^2 + 9x + 4 = 0 | simplified solution : ((-0.543, -2.457)), generalized solution : ((-9 + sqrt(33))/2*3, (-9 - sqrt(33))/2*3) | complex_quadratic | -| 105 | Combine Like terms | 9x^3 + 10x^7 + 1x^6 + 9x^3 + 5x^4 + 1x^2 + 9x^5 + 2x^2 | 3x^2 + 18x^3 + 5x^4 + 9x^5 + 1x^6 + 10x^7 | combine_like_terms | -| 111 | Expanding Factored Binomial | (-7x+3)(-5x) | 35*x^2-15*x | expanding | +| 11 | Basic Algebra | 1x + 7 = 8 | 1 | basic_algebra | +| 12 | Logarithm | log3(243) | 5 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 1 * [[1, 10], [4, 7]] = | [[1,10],[4,7]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (2,2),(9,-20)= | (5.5,-9.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2-11x+30 | (x-5)(x-6) | factoring | +| 23 | Solve a System of Equations in R^2 | 5x - 2y = -22, x + 3y = 16 | x = -2, y = 6 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (1, 17) and (3, -13) | sqrt(904) | distance_two_points | +| 26 | Linear Equations | 11x + 1y = 110, 20x + 14y = 200 | x = 10, y = 0 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 9/5x - 10 and y = -2/3x + 4 | (210/37, 8/37) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [3, -13, -15] X [-7, -17, -2] = | [-229, 111, -142] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 5720 dollars, 1% rate of interest and for a time period of 6 years is = | 343.2 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
10
-22
-88
-109
and
-8-90-2
-7-7-109
|
-8-90-2
24-2022
816-8088
1727-90101
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 95x^2+151x+54=0 | [-0.54, -1.05] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (-16+18j) * (20-9j) = | (-158+504j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [-8, 19, -7] . [13, 12, 16] = | 12 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[23, 40, 67], [72, 41, 63], [71, 75, 27]]) is: | Matrix([[-3618/184709, 3945/184709, -227/184709], [2529/184709, -4136/184709, 3375/184709], [2489/184709, 1115/184709, -1937/184709]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[92, 39], [87, 30]]) = | -633 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 3384 dollars, 10% rate of interest and for a time period of 5 year is = | 5449.97 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 6x + 3 = 0 | simplified solution : ((-0.634, -2.366)), generalized solution : ((-6 + sqrt(12))/2*2, (-6 - sqrt(12))/2*2) | complex_quadratic | +| 105 | Combine Like terms | 2x^3 + 2x^2 + 9x^2 + 10x^2 + 1x^4 | 21x^2 + 2x^3 + 1x^4 | combine_like_terms | +| 111 | Expanding Factored Binomial | (2x-5)(+4x-2) | 8*x^2-24*x+10 | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 44+29= | 73 | addition | -| 1 | Subtraction | 20-6= | 14 | subtraction | -| 2 | Multiplication | 37*2= | 74 | multiplication | -| 3 | Division | 322/23= | 14 | division | -| 6 | Square Root | sqrt(144)= | 12 | square_root | -| 8 | Square | 18^2= | 324 | square | -| 13 | Complex Division | 20/25= | 0.8 | complex_division | -| 16 | Fraction Division | (2/1)/(2/9) | 9 | divide_fractions | -| 28 | Fraction Multiplication | (10/6)*(10/3) | 50/9 | fraction_multiplication | -| 31 | Factorial | 6! = | 720 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 2/8 and 10/2? | < | compare_fractions | -| 47 | Cube Root | cuberoot of 343 upto 2 decimal places is: | 7.0 | cube_root | -| 53 | Exponentiation | 10^7 = | 10000000 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -7 and -5 = | 2 | absolute_difference | -| 80 | Percentage of a number | What is 93% of 68? | Required percentage = 63.24% | percentage | -| 90 | isprime | 60 | False | is_prime | -| 97 | Power of Powers | The 17^2^5 = 17^(2*5) = 17^10 | 2015993900449 | power_of_powers | +| 0 | Addition | 46+18= | 64 | addition | +| 1 | Subtraction | 46-35= | 11 | subtraction | +| 2 | Multiplication | 38*0= | 0 | multiplication | +| 3 | Division | 192/16= | 12 | division | +| 6 | Square Root | sqrt(16)= | 4 | square_root | +| 8 | Square | 4^2= | 16 | square | +| 13 | Complex Division | 26/40= | 0.65 | complex_division | +| 16 | Fraction Division | (4/3)/(8/10) | 5/3 | divide_fractions | +| 28 | Fraction Multiplication | (7/3)*(2/5) | 14/15 | fraction_multiplication | +| 31 | Factorial | 3! = | 6 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 4/5 and 7/1? | < | compare_fractions | +| 47 | Cube Root | cuberoot of 718 upto 2 decimal places is: | 8.95 | cube_root | +| 53 | Exponentiation | 17^6 = | 24137569 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -27 and 96 = | 123 | absolute_difference | +| 80 | Percentage of a number | What is 55% of 82? | Required percentage = 45.10% | percentage | +| 90 | isprime | 61 | True | is_prime | +| 97 | Power of Powers | The 42^1^2 = 42^(1*2) = 42^2 | 1764 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 9x^5 | 45x^4 | power_rule_differentiation | -| 48 | Power Rule Integration | 10x^10 + 8x^10 + 7x^6 | (10/10)x^11 + (8/10)x^11 + (7/6)x^7 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(sec(x)+7*x^(-2))/dx | tan(x)*sec(x) - 14/x^3 | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 63x^2 + 37x + 60 is = | 99.5 | definite_integral | -| 110 | Stationary Points | f(x)=3*x^3 + 5*x^2 | (-10/9,500/243),(0,0) | stationary_points | +| 7 | Power Rule Differentiation | 1x^2 + 3x^5 + 6x^7 | 2x^1 + 15x^4 + 42x^6 | power_rule_differentiation | +| 48 | Power Rule Integration | 9x^1 + 10x^4 + 5x^6 | (9/1)x^2 + (10/4)x^5 + (5/6)x^7 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(tan(x)+5*x^(-2))/dx | tan(x)^2 + 1 - 10/x^3 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 20x^2 + 27x + 41 is = | 61.1667 | definite_integral | +| 110 | Stationary Points | f(x)=7*x^3 + 2*x^2 + 6 | (-4/21,7970/1323),(0,6) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 00100100= | 11011011 | binary_complement_1s | -| 5 | Modulo Division | 48%40= | 8 | modulo_division | -| 14 | Decimal to Binary | Binary of 2= | 10 | decimal_to_binary | -| 15 | Binary to Decimal | 11101 | 29 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 11 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55] | fibonacci_series | -| 62 | nth Fibonacci number | What is the 48th Fibonacci number? | 4807526976 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 00110100 | 0x34 | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of 11000000 = | 1000000 | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 943= | 0x3af | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 1630 in Octal is: | 0o3136 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 8 is = | 34644 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 5077 is = | 13135 | decimal_to_bcd | +| 4 | Binary Complement 1s | 00011= | 11100 | binary_complement_1s | +| 5 | Modulo Division | 0%10= | 0 | modulo_division | +| 14 | Decimal to Binary | Binary of 62= | 111110 | decimal_to_binary | +| 15 | Binary to Decimal | 0101101 | 45 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 13 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 63th Fibonacci number? | 6557470319842 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 110010100 | 0x194 | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of 10 = | 10 | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 797= | 0x31d | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 3704 in Octal is: | 0o7170 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 30104 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 2037 is = | 7155 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 13 2 7 = | (1.723230794081419e-15+28.142494558940577j) | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 10, 48 and 21 exist? | No | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 24 and 76 = | 80 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 19 and 8 = | 20.62 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 11 sides | 147.27 | angle_regular_polygon | -| 32 | Surface Area of Cube | Surface area of cube with side = 6m is | 216 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 15m, 14m, 13m is | 1174 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 24m and radius = 8m is | 1608 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 = 15m, 16m, 9m is | 2160 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 48m and radius = 4m is | 2412 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 41m and radius = 1m is | 131 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 1m and radius = 13m is | 176 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 153 , 48, 31 = | 128 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is cos(90)? | 0 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 6 sides = | 720 | sum_of_polygon_angles | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 8m is | 804.247719318987 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 71 m = | 1499214.0909853016 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [515.22, 683.73, 303.04] and [503.08, 698.99, 749.7] is: | 0.38 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 26 and angle, 63. Find the area of the sector. | Area of sector = 371.65041 | sector_area | -| 86 | Degrees to Radians | Angle 110 in radians is = | 1.92 | degree_to_rad | -| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 36 and height, 49? | CSA of cylinder = 11083.54 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 5 sided polygon with lengths of [47, 53, 3, 94, 41]cm is: | 238 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 30 | 188.49555921538757 | circumference | -| 108 | Arc length of Angle | Given radius, 46 and angle, 136. Find the arc length of the angle. | Arc length of the angle = 109.18780 | arc_length | -| 112 | Area of Circle | Area of circle with radius 24 | 1810.2857142857142 | area_of_circle | +| 18 | Area of Triangle | Area of triangle with side lengths: 7 4 7 = | 13.416407864998739 | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 7, 31 and 16 exist? | No | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 73 and 76 = | 31 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 16 and 5 = | 16.76 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 12 sides | 150.0 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 1m is | 6 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 1m, 18m, 12m is | 492 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 11m and radius = 17m is | 2990 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 = 16m, 18m, 10m is | 2880 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 13m and radius = 4m is | 653 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 30m and radius = 16m is | 2513 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 14m and radius = 20m is | 5864 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 25 , 183, 109 = | 43 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is sin(30)? | 1/2 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 10m is | 1256.6370614359173 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 61 m = | 950775.7894726198 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [437.0, 613.71, 778.37, 977.11, 617.14, 527.38, 196.94, 993.88, 186.86, 937.36, 323.15, 896.54, 646.74] and [753.99, 971.66, 175.71, 81.48, 178.5, 671.53, 624.94, 662.16, 533.37, 974.47, 598.63, 690.91, 743.68] is: | 0.62 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 2 and angle, 324. Find the area of the sector. | Area of sector = 11.30973 | sector_area | +| 86 | Degrees to Radians | Angle 47 in radians is = | 0.82 | degree_to_rad | +| 87 | Radians to Degrees | Angle 0 in degrees is = | 0.0 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 19 and height, 88? | CSA of cylinder = 10505.49 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 3 sided polygon with lengths of [27, 98, 14]cm is: | 139 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 90 | 565.4866776461628 | circumference | +| 108 | Arc length of Angle | Given radius, 2 and angle, 37. Find the arc length of the angle. | Arc length of the angle = 1.29154 | arc_length | +| 112 | Area of Circle | Area of circle with radius 0 | 0.0 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 5 and 1 = | 5 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 17 and 5 = | 1 | gcd | -| 27 | Prime Factorisation | Find prime factors of 43 | [43] | prime_factors | -| 40 | Common Factors | Common Factors of 100 and 43 = | [1] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 19 and 8 = | 1 | hcf | -| 55 | Comparing surds | Fill in the blanks 21^(1/2) _ 74^(1/1) | < | surds_comparison | -| 63 | Profit or Loss Percent | Profit percent when CP = 583 and SP = 985 is: | 68.95368782161235 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [8, 48, 288, 1728, 10368, 62208] ,Find the value of a,common ratio,7th term value, sum upto 11th term | The value of a is 8, common ratio is 6 , 7th term is 373248 , sum upto 11th term is 580475288.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 64 , 32 and 73 = | (64*32*73)^(1/3) = 53.074299494939964 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 82 , 34 and 66 = | 3/((1/82) + (1/34) + (1/66)) = 52.855610877058595 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[232.9350882815303, 335.2563860261166, 506.63279598159386, 4.115597138930505, 459.81390060105355, 678.3362850124494, 907.3819064859937, 636.8110397295957, 20.43113538894692, 779.147081565477, 572.3940764483918, 803.6488004919244] is: | 1976.0471832445305 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 100 degrees Celsius to degrees Fahrenheit = | 212.0 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 73 of the AP series: -96, -76, -56 ... | 1344 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 98 terms of the AP series: -4, -55, -106 ... | -242795.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 809 in Roman Numerals is: | DCCCIX | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 15.26exp(i2.12) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={1, 2, 7} ,b={1, 2, 3, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 6, 7},Intersection is {1, 2}, a-b is {7},b-a is {3, 6}, Symmetric difference is {3, 6, 7} | set_operation | -| 94 | Base Conversion | Convert 10212220 from base 3 to base 15. | C8C | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 9^10 and 9^5 = 9^(10-5) = 9^5 | 59049 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 43^2 and 13^2 = (43/13)^2 = 3.3076923076923075^2 | 10.940828402366863 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 1993 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 838 minutes to Hours & Minutes | 13 hours and 58 minutes | minutes_to_hours | -| 106 | signum function | signum of 492 is = | 1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 37.97% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 18 pistons will contain no more than 2 rejected pistons? | 1.28 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 16 and 10 = | 80 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 13 and 1 = | 1 | gcd | +| 27 | Prime Factorisation | Find prime factors of 11 | [11] | prime_factors | +| 40 | Common Factors | Common Factors of 65 and 19 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 20 and 14 = | 2 | hcf | +| 55 | Comparing surds | Fill in the blanks 78^(1/7) _ 52^(1/9) | > | surds_comparison | +| 63 | Profit or Loss Percent | Loss percent when CP = 431 and SP = 150 is: | 65.19721577726219 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [3, 12, 48, 192, 768, 3072] ,Find the value of a,common ratio,11th term value, sum upto 11th term | The value of a is 3, common ratio is 4 , 11th term is 3145728 , sum upto 11th term is 4194303.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 40 , 63 , 65 , 24 = | (40*63*65*24)^(1/4) = 44.52780476312522 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 48 , 59 , 75 , 80 = | 4/((1/48) + (1/59) + (1/75) + (1/80)) = 62.87744227353463 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[249.0015460376116, 867.8122114074212, 4.2765473742734095, 450.4653172064377, 435.0307355906793, 628.6207356296137, 313.9369656743921, 290.1828788563886, 716.1780160982277, 29.88164461825127] is: | 1516.2517107189344 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 22 degrees Celsius to degrees Fahrenheit = | 71.6 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 93 of the AP series: 54, 33, 12 ... | -1878 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 21 terms of the AP series: -96, -65, -34 ... | 4494.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 3999 in Roman Numerals is: | MMMCMXCIX | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 13.04exp(i-3.06) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 10, 3, 5} ,b={1, 3, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 3, 5, 6, 8, 10},Intersection is {3}, a-b is {8, 10, 5},b-a is {1, 6}, Symmetric difference is {1, 5, 6, 8, 10} | set_operation | +| 94 | Base Conversion | Convert 7959 from base 16 to base 9. | 46546 | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 40^4 and 40^4 = 40^(4-4) = 40^0 | 1 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 26^7 and 33^7 = (26/33)^7 = 0.7878787878787878^7 | 0.1884585549109465 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 1975 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 151 minutes to Hours & Minutes | 2 hours and 31 minutes | minutes_to_hours | +| 106 | signum function | signum of -252 is = | -1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 39.81% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 15 pistons will contain no more than 5 rejected pistons? | 40.91 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 17 objects picked 2 at a time | 136 | combinations | -| 42 | Permutations | Number of Permutations from 20 objects picked 6 at a time = | 27907200 | permutation | -| 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 3 = | 1/6 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [201, 225, 283, 208, 275, 259, 270, 211, 202, 257, 299, 215, 276, 238, 209, 206, 216, 265, 249, 252, 278, 292, 210, 274, 200, 217, 241, 247, 297, 221, 272, 242, 254, 293, 214, 250, 230, 262, 294, 212] with 80% confidence is | (251.69255044389794, 239.10744955610207) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[12, 42, 30, 24, 38, 23, 40, 21, 15, 18, 13, 7, 41, 39, 40] | The Mean is 26.866666666666667 , Standard Deviation is 142.6488888888889, Variance is 11.943571027497969 | data_summary | -| 76 | Mean and Median | Given the series of numbers [9, 42, 63, 56, 19, 30, 97, 8, 40, 94]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 45.8 and Arithmetic median of this series is 41.0 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.56% of population have. Test sensitivity (true positive) is equal to SN= 98.38% whereas test specificity (true negative) SP= 94.57%. What is the probability that this guy really has that disease? | 22.31% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 11 objects picked 8 at a time | 165 | combinations | +| 42 | Permutations | Number of Permutations from 17 objects picked 1 at a time = | 17 | permutation | +| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 14 = | 15/216 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [270, 291, 266, 239, 273, 283, 243, 288, 289, 214, 226, 209, 258, 256, 249, 202, 220, 253, 208, 236, 245, 221, 271, 264, 240, 293] with 90% confidence is | (259.0741428605511, 241.46431867791048) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[46, 25, 24, 23, 49, 22, 17, 8, 24, 28, 37, 31, 31, 23, 8] | The Mean is 26.4 , Standard Deviation is 124.90666666666668, Variance is 11.17616511450447 | data_summary | +| 76 | Mean and Median | Given the series of numbers [21, 85, 4, 40, 42, 50, 69, 75, 91, 71]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 54.8 and Arithmetic median of this series is 59.5 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.68% of population have. Test sensitivity (true positive) is equal to SN= 94.32% whereas test specificity (true negative) SP= 99.09%. What is the probability that this guy really has that disease? | 63.91% | conditional_probability | From c50983580ad9515ebe1727b499bf87705e8758f2 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:11:12 -0500 Subject: [PATCH 06/10] readme reference update --- README.md | 231 +++++++++++++++++++++++++------------------------- makeReadme.py | 5 +- 2 files changed, 119 insertions(+), 117 deletions(-) diff --git a/README.md b/README.md index c42fea9..de71c60 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ To try out generators, go to If you have an idea for a generator, please add it as an issue and tag it with the "New Generator" label. ## Table of Contents -* [Usage](#Usage) -* [Basic Documentation](#basic-documentation) +* [Installation](#installation) +* [Basic Usage](#basic-usage) +* [Documentation](#documentation) * [List of Generators](#list-of-generators) * [algebra](#algebra) * [basic_math](#basic_math) @@ -61,134 +62,134 @@ mathgen.write_pdf(worksheet) ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 1x + 7 = 8 | 1 | basic_algebra | -| 12 | Logarithm | log3(243) | 5 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 1 * [[1, 10], [4, 7]] = | [[1,10],[4,7]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (2,2),(9,-20)= | (5.5,-9.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2-11x+30 | (x-5)(x-6) | factoring | -| 23 | Solve a System of Equations in R^2 | 5x - 2y = -22, x + 3y = 16 | x = -2, y = 6 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (1, 17) and (3, -13) | sqrt(904) | distance_two_points | -| 26 | Linear Equations | 11x + 1y = 110, 20x + 14y = 200 | x = 10, y = 0 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 9/5x - 10 and y = -2/3x + 4 | (210/37, 8/37) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [3, -13, -15] X [-7, -17, -2] = | [-229, 111, -142] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 5720 dollars, 1% rate of interest and for a time period of 6 years is = | 343.2 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
10
-22
-88
-109
and
-8-90-2
-7-7-109
|
-8-90-2
24-2022
816-8088
1727-90101
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 95x^2+151x+54=0 | [-0.54, -1.05] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (-16+18j) * (20-9j) = | (-158+504j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [-8, 19, -7] . [13, 12, 16] = | 12 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[23, 40, 67], [72, 41, 63], [71, 75, 27]]) is: | Matrix([[-3618/184709, 3945/184709, -227/184709], [2529/184709, -4136/184709, 3375/184709], [2489/184709, 1115/184709, -1937/184709]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[92, 39], [87, 30]]) = | -633 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 3384 dollars, 10% rate of interest and for a time period of 5 year is = | 5449.97 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 6x + 3 = 0 | simplified solution : ((-0.634, -2.366)), generalized solution : ((-6 + sqrt(12))/2*2, (-6 - sqrt(12))/2*2) | complex_quadratic | -| 105 | Combine Like terms | 2x^3 + 2x^2 + 9x^2 + 10x^2 + 1x^4 | 21x^2 + 2x^3 + 1x^4 | combine_like_terms | -| 111 | Expanding Factored Binomial | (2x-5)(+4x-2) | 8*x^2-24*x+10 | expanding | +| 11 | Basic Algebra | 4x + 7 = 7 | 0 | basic_algebra | +| 12 | Logarithm | log3(6561) | 8 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[3, 9], [5, 7]] = | [[30,90],[50,70]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (-12,-6),(19,-10)= | (3.5,-8.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2+18x+80 | (x+8)(x+10) | factoring | +| 23 | Solve a System of Equations in R^2 | 8x + 6y = 72, -3x + 3y = -6 | x = 6, y = 4 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (17, -8) and (-9, -14) | sqrt(712) | distance_two_points | +| 26 | Linear Equations | -1x + 1y = -27, 11x + -17y = 405 | x = 9, y = -18 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -9/4x + 2 and y = -9x - 1 | (-4/9, 3) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [-19, 19, 20] X [-12, 20, -4] = | [-476, -316, -152] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 7547 dollars, 10% rate of interest and for a time period of 8 years is = | 6037.6 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
-7-4
-4-9
-37
and
10-24
-6-52
|
-4634-36
1453-34
-72-292
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 66x^2+187x+25=0 | [-0.14, -2.69] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (-1+5j) * (-18+20j) = | (-82-110j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [1, -1, -14] . [17, 6, 20] = | -269 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[37, 76, 39], [67, 82, 13], [61, 73, 79]]) is: | Matrix([[-1843/47252, 3157/141756, 1105/70878], [375/11813, -136/35439, -533/35439], [37/47252, -645/47252, 343/23626]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[91, 18], [68, 24]]) = | 960 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 2610 dollars, 5% rate of interest and for a time period of 1 year is = | 2740.5 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 4x^2 + 4x + 1 = 0 | simplified solution : ((-0.5, -0.5)), generalized solution : ((-4 + 0)/2*4, (-4 - 0)/2*4) | complex_quadratic | +| 105 | Combine Like terms | 1x^2 + 7x^2 + 6x^4 + 5x^4 + 5x^2 | 13x^2 + 11x^4 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-5x-10)(+5x+9) | -25*x^2-95*x-90 | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 46+18= | 64 | addition | -| 1 | Subtraction | 46-35= | 11 | subtraction | -| 2 | Multiplication | 38*0= | 0 | multiplication | -| 3 | Division | 192/16= | 12 | division | -| 6 | Square Root | sqrt(16)= | 4 | square_root | -| 8 | Square | 4^2= | 16 | square | -| 13 | Complex Division | 26/40= | 0.65 | complex_division | -| 16 | Fraction Division | (4/3)/(8/10) | 5/3 | divide_fractions | -| 28 | Fraction Multiplication | (7/3)*(2/5) | 14/15 | fraction_multiplication | -| 31 | Factorial | 3! = | 6 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 4/5 and 7/1? | < | compare_fractions | -| 47 | Cube Root | cuberoot of 718 upto 2 decimal places is: | 8.95 | cube_root | -| 53 | Exponentiation | 17^6 = | 24137569 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -27 and 96 = | 123 | absolute_difference | -| 80 | Percentage of a number | What is 55% of 82? | Required percentage = 45.10% | percentage | -| 90 | isprime | 61 | True | is_prime | -| 97 | Power of Powers | The 42^1^2 = 42^(1*2) = 42^2 | 1764 | power_of_powers | +| 0 | Addition | 49+48= | 97 | addition | +| 1 | Subtraction | 61-29= | 32 | subtraction | +| 2 | Multiplication | 14*1= | 14 | multiplication | +| 3 | Division | 57/19= | 3 | division | +| 6 | Square Root | sqrt(1)= | 1 | square_root | +| 8 | Square | 6^2= | 36 | square | +| 13 | Complex Division | 25/4= | 6.25 | complex_division | +| 16 | Fraction Division | (3/2)/(1/4) | 6 | divide_fractions | +| 28 | Fraction Multiplication | (8/3)*(1/4) | 2/3 | fraction_multiplication | +| 31 | Factorial | 5! = | 120 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 9/8 and 5/4? | < | compare_fractions | +| 47 | Cube Root | cuberoot of 658 upto 2 decimal places is: | 8.7 | cube_root | +| 53 | Exponentiation | 15^10 = | 576650390625 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -6 and -50 = | 44 | absolute_difference | +| 80 | Percentage of a number | What is 55% of 14? | Required percentage = 7.70% | percentage | +| 90 | isprime | 71 | True | is_prime | +| 97 | Power of Powers | The 12^6^4 = 12^(6*4) = 12^24 | 79496847203390844133441536 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 1x^2 + 3x^5 + 6x^7 | 2x^1 + 15x^4 + 42x^6 | power_rule_differentiation | -| 48 | Power Rule Integration | 9x^1 + 10x^4 + 5x^6 | (9/1)x^2 + (10/4)x^5 + (5/6)x^7 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(tan(x)+5*x^(-2))/dx | tan(x)^2 + 1 - 10/x^3 | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 20x^2 + 27x + 41 is = | 61.1667 | definite_integral | -| 110 | Stationary Points | f(x)=7*x^3 + 2*x^2 + 6 | (-4/21,7970/1323),(0,6) | stationary_points | +| 7 | Power Rule Differentiation | 9x^10 + 6x^10 + 1x^6 + 10x^3 | 90x^9 + 60x^9 + 6x^5 + 30x^2 | power_rule_differentiation | +| 48 | Power Rule Integration | 3x^10 + 5x^6 + 10x^6 | (3/10)x^11 + (5/6)x^7 + (10/6)x^7 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(ln(x)+5*x^2)/dx | 10*x + 1/x | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 80x^2 + 100x + 5 is = | 81.6667 | definite_integral | +| 110 | Stationary Points | f(x)=10*x^3 + 9*x^2 + 3 | (-3/5,102/25),(0,3) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 00011= | 11100 | binary_complement_1s | -| 5 | Modulo Division | 0%10= | 0 | modulo_division | -| 14 | Decimal to Binary | Binary of 62= | 111110 | decimal_to_binary | -| 15 | Binary to Decimal | 0101101 | 45 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 13 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144] | fibonacci_series | -| 62 | nth Fibonacci number | What is the 63th Fibonacci number? | 6557470319842 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 110010100 | 0x194 | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of 10 = | 10 | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 797= | 0x31d | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 3704 in Octal is: | 0o7170 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 7 is = | 30104 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 2037 is = | 7155 | decimal_to_bcd | +| 4 | Binary Complement 1s | 010000= | 101111 | binary_complement_1s | +| 5 | Modulo Division | 87%99= | 87 | modulo_division | +| 14 | Decimal to Binary | Binary of 3= | 11 | decimal_to_binary | +| 15 | Binary to Decimal | 0010110100 | 180 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 7 numbers is ? | [0, 1, 1, 2, 3, 5, 8] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 47th Fibonacci number? | 2971215073 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 000011010 | 0x1a | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of 10011 = | 1101 | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 978= | 0x3d2 | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 2183 in Octal is: | 0o4207 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 6 is = | 26179 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 8980 is = | 2314 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 7 4 7 = | 13.416407864998739 | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 7, 31 and 16 exist? | No | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 73 and 76 = | 31 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 16 and 5 = | 16.76 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 12 sides | 150.0 | angle_regular_polygon | -| 32 | Surface Area of Cube | Surface area of cube with side = 1m is | 6 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 1m, 18m, 12m is | 492 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 11m and radius = 17m is | 2990 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 = 16m, 18m, 10m is | 2880 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 13m and radius = 4m is | 653 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 30m and radius = 16m is | 2513 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 14m and radius = 20m is | 5864 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 25 , 183, 109 = | 43 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is sin(30)? | 1/2 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 10m is | 1256.6370614359173 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 61 m = | 950775.7894726198 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [437.0, 613.71, 778.37, 977.11, 617.14, 527.38, 196.94, 993.88, 186.86, 937.36, 323.15, 896.54, 646.74] and [753.99, 971.66, 175.71, 81.48, 178.5, 671.53, 624.94, 662.16, 533.37, 974.47, 598.63, 690.91, 743.68] is: | 0.62 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 2 and angle, 324. Find the area of the sector. | Area of sector = 11.30973 | sector_area | -| 86 | Degrees to Radians | Angle 47 in radians is = | 0.82 | degree_to_rad | -| 87 | Radians to Degrees | Angle 0 in degrees is = | 0.0 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 19 and height, 88? | CSA of cylinder = 10505.49 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 3 sided polygon with lengths of [27, 98, 14]cm is: | 139 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 90 | 565.4866776461628 | circumference | -| 108 | Arc length of Angle | Given radius, 2 and angle, 37. Find the arc length of the angle. | Arc length of the angle = 1.29154 | arc_length | -| 112 | Area of Circle | Area of circle with radius 0 | 0.0 | area_of_circle | +| 18 | Area of Triangle | Area of triangle with side lengths: 10 8 8 = | 31.22498999199199 | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 3, 49 and 40 exist? | No | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 40 and 55 = | 85 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 10 and 8 = | 12.81 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 13 sides | 152.31 | angle_regular_polygon | +| 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 = 2m, 9m, 3m is | 102 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 10m and radius = 5m is | 471 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 14m is | 2744 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 19m, 4m, 20m is | 1520 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 42m and radius = 17m is | 38132 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 45m and radius = 1m is | 144 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 4m and radius = 11m is | 506 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 81 , 55, 163 = | 61 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is sin(60)? | √3/2 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 9 sides = | 1260 | sum_of_polygon_angles | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 6m is | 452.3893421169302 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 80 m = | 2144660.584850632 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [956.55, 864.51, 874.49, 333.53, 113.01, 10.44, 653.97, 374.14, 904.82, 608.05, 99.98, 572.65, 354.05, 655.03, 327.04, 853.25, 319.43, 678.41] and [15.79, 792.32, 392.52, 370.7, 283.13, 531.51, 389.19, 480.01, 188.33, 278.59, 964.88, 541.74, 303.95, 941.8, 96.12, 76.43, 864.81, 112.41] is: | 0.88 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 35 and angle, 335. Find the area of the sector. | Area of sector = 3581.19746 | sector_area | +| 86 | Degrees to Radians | Angle 147 in radians is = | 2.57 | degree_to_rad | +| 87 | Radians to Degrees | Angle 1 in degrees is = | 57.3 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 48 and height, 55? | CSA of cylinder = 16587.61 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 10 sided polygon with lengths of [104, 52, 101, 64, 71, 4, 34, 86, 81, 30]cm is: | 627 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 12 | 75.39822368615503 | circumference | +| 108 | Arc length of Angle | Given radius, 42 and angle, 156. Find the arc length of the angle. | Arc length of the angle = 114.35397 | arc_length | +| 112 | Area of Circle | Area of circle with radius 39 | 4780.285714285714 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 16 and 10 = | 80 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 13 and 1 = | 1 | gcd | -| 27 | Prime Factorisation | Find prime factors of 11 | [11] | prime_factors | -| 40 | Common Factors | Common Factors of 65 and 19 = | [1] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 20 and 14 = | 2 | hcf | -| 55 | Comparing surds | Fill in the blanks 78^(1/7) _ 52^(1/9) | > | surds_comparison | -| 63 | Profit or Loss Percent | Loss percent when CP = 431 and SP = 150 is: | 65.19721577726219 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [3, 12, 48, 192, 768, 3072] ,Find the value of a,common ratio,11th term value, sum upto 11th term | The value of a is 3, common ratio is 4 , 11th term is 3145728 , sum upto 11th term is 4194303.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 40 , 63 , 65 , 24 = | (40*63*65*24)^(1/4) = 44.52780476312522 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 48 , 59 , 75 , 80 = | 4/((1/48) + (1/59) + (1/75) + (1/80)) = 62.87744227353463 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[249.0015460376116, 867.8122114074212, 4.2765473742734095, 450.4653172064377, 435.0307355906793, 628.6207356296137, 313.9369656743921, 290.1828788563886, 716.1780160982277, 29.88164461825127] is: | 1516.2517107189344 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 22 degrees Celsius to degrees Fahrenheit = | 71.6 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 93 of the AP series: 54, 33, 12 ... | -1878 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 21 terms of the AP series: -96, -65, -34 ... | 4494.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 3999 in Roman Numerals is: | MMMCMXCIX | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 13.04exp(i-3.06) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 10, 3, 5} ,b={1, 3, 6}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 3, 5, 6, 8, 10},Intersection is {3}, a-b is {8, 10, 5},b-a is {1, 6}, Symmetric difference is {1, 5, 6, 8, 10} | set_operation | -| 94 | Base Conversion | Convert 7959 from base 16 to base 9. | 46546 | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 40^4 and 40^4 = 40^(4-4) = 40^0 | 1 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 26^7 and 33^7 = (26/33)^7 = 0.7878787878787878^7 | 0.1884585549109465 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 1975 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 151 minutes to Hours & Minutes | 2 hours and 31 minutes | minutes_to_hours | -| 106 | signum function | signum of -252 is = | -1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 39.81% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 15 pistons will contain no more than 5 rejected pistons? | 40.91 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 6 and 20 = | 60 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 2 and 2 = | 2 | gcd | +| 27 | Prime Factorisation | Find prime factors of 100 | [2, 2, 5, 5] | prime_factors | +| 40 | Common Factors | Common Factors of 84 and 41 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 3 and 20 = | 1 | hcf | +| 55 | Comparing surds | Fill in the blanks 20^(1/4) _ 26^(1/6) | > | surds_comparison | +| 63 | Profit or Loss Percent | Profit percent when CP = 235 and SP = 844 is: | 259.1489361702128 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [7, 42, 252, 1512, 9072, 54432] ,Find the value of a,common ratio,9th term value, sum upto 8th term | The value of a is 7, common ratio is 6 , 9th term is 11757312 , sum upto 8th term is 2351461.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 2 numbers 74 and 4 = | (74*4)^(1/2) = 17.204650534085253 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 41 , 30 , 67 , 10 = | 4/((1/41) + (1/30) + (1/67) + (1/10)) = 23.168400337362947 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[88.31792181152476, 63.99729325678627, 241.6129026822925, 248.43562116710117, 359.69249783374147, 165.59992609948227, 105.69265168153541] is: | 547.6912694265379 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 47 degrees Celsius to degrees Fahrenheit = | 116.60000000000001 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 72 of the AP series: 50, 91, 132 ... | 2961 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 96 terms of the AP series: -11, 58, 127 ... | 313584.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 3140 in Roman Numerals is: | MMMCXL | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 17.12exp(i1.69) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 4, 7} ,b={1, 2, 5, 7}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 4, 5, 7, 8},Intersection is {7}, a-b is {8, 4},b-a is {1, 2, 5}, Symmetric difference is {1, 2, 4, 5, 8} | set_operation | +| 94 | Base Conversion | Convert B76F from base 16 to base 10. | 46959 | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 2^10 and 2^5 = 2^(10-5) = 2^5 | 32 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 20^3 and 13^3 = (20/13)^3 = 1.5384615384615385^3 | 3.641329085116068 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 1988 | is a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 860 minutes to Hours & Minutes | 14 hours and 20 minutes | minutes_to_hours | +| 106 | signum function | signum of -220 is = | -1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 35.73% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 14 pistons will contain no more than 2 rejected pistons? | 7.57 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 11 objects picked 8 at a time | 165 | combinations | -| 42 | Permutations | Number of Permutations from 17 objects picked 1 at a time = | 17 | permutation | -| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 14 = | 15/216 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [270, 291, 266, 239, 273, 283, 243, 288, 289, 214, 226, 209, 258, 256, 249, 202, 220, 253, 208, 236, 245, 221, 271, 264, 240, 293] with 90% confidence is | (259.0741428605511, 241.46431867791048) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[46, 25, 24, 23, 49, 22, 17, 8, 24, 28, 37, 31, 31, 23, 8] | The Mean is 26.4 , Standard Deviation is 124.90666666666668, Variance is 11.17616511450447 | data_summary | -| 76 | Mean and Median | Given the series of numbers [21, 85, 4, 40, 42, 50, 69, 75, 91, 71]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 54.8 and Arithmetic median of this series is 59.5 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.68% of population have. Test sensitivity (true positive) is equal to SN= 94.32% whereas test specificity (true negative) SP= 99.09%. What is the probability that this guy really has that disease? | 63.91% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 13 objects picked 7 at a time | 1716 | combinations | +| 42 | Permutations | Number of Permutations from 20 objects picked 5 at a time = | 1860480 | permutation | +| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 16 = | 6/216 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [248, 294, 218, 252, 232, 271, 263, 213, 282, 244, 202, 270, 268, 257, 215, 262, 250, 239, 223, 253] with 80% confidence is | (254.68566484458836, 240.91433515541166) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[45, 33, 42, 7, 43, 38, 28, 26, 20, 48, 44, 46, 12, 39, 25] | The Mean is 33.06666666666667 , Standard Deviation is 154.9955555555556, Variance is 12.449721103524993 | data_summary | +| 76 | Mean and Median | Given the series of numbers [12, 81, 93, 55, 5, 46, 35, 6, 91, 50]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 47.4 and Arithmetic median of this series is 48.0 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 0.52% of population have. Test sensitivity (true positive) is equal to SN= 98.31% whereas test specificity (true negative) SP= 96.83%. What is the probability that this guy really has that disease? | 13.95% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index e90f438..3a7f8d7 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -17,8 +17,9 @@ def write_table_of_contents(): lines = [] tc_lines = [ - '* [Usage](#Usage)\n', - '* [Basic Documentation](#basic-documentation)\n', + '* [Installation](#installation)\n', + '* [Basic Usage](#basic-usage)\n', + '* [Documentation](#documentation)\n', '* [List of Generators](#list-of-generators)\n', ] for subject in subjects: From 41fdc0f5dfcefa1dd80f9b239b922ca4a00bae15 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:13:08 -0500 Subject: [PATCH 07/10] moved and added more complicated usage reference --- README.md | 242 +++++++++++++++++++++++++------------------------- makeReadme.py | 1 + 2 files changed, 122 insertions(+), 121 deletions(-) diff --git a/README.md b/README.md index de71c60..b878d05 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you have an idea for a generator, please add it as an issue and tag it with t ## Table of Contents * [Installation](#installation) * [Basic Usage](#basic-usage) -* [Documentation](#documentation) + * [More Complicated Usage](#more-complicated-usage)* [Documentation](#documentation) * [List of Generators](#list-of-generators) * [algebra](#algebra) * [basic_math](#basic_math) @@ -39,14 +39,7 @@ problem, solution = mathgen.addition() #another way to generate an addition problem using genById() problem, solution = mathgen.genById(0) ``` -## Documentation -`getGenList()` returns a list of all generators in the repository in the format `[id, title, self, funcname]` - -`genById(id)` generates a problem, solution set with generator id `id` in the form of a list in the format `[problem, solution]` - -`make_pdf(id, count)` creates a printable pdf worksheet with `count` problems generated by the generator with id `id`. - -### More complicated worksheets +### More Complicated Usage ``` import sys @@ -58,138 +51,145 @@ mathgen.add_section_with_task_to_worksheet(worksheet, 2, 5) mathgen.write_pdf(worksheet) ``` +## Documentation +`getGenList()` returns a list of all generators in the repository in the format `[id, title, self, funcname]` + +`genById(id)` generates a problem, solution set with generator id `id` in the form of a list in the format `[problem, solution]` + +`make_pdf(id, count)` creates a printable pdf worksheet with `count` problems generated by the generator with id `id`. + ## List of Generators ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 4x + 7 = 7 | 0 | basic_algebra | -| 12 | Logarithm | log3(6561) | 8 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 10 * [[3, 9], [5, 7]] = | [[30,90],[50,70]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (-12,-6),(19,-10)= | (3.5,-8.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2+18x+80 | (x+8)(x+10) | factoring | -| 23 | Solve a System of Equations in R^2 | 8x + 6y = 72, -3x + 3y = -6 | x = 6, y = 4 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (17, -8) and (-9, -14) | sqrt(712) | distance_two_points | -| 26 | Linear Equations | -1x + 1y = -27, 11x + -17y = 405 | x = 9, y = -18 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -9/4x + 2 and y = -9x - 1 | (-4/9, 3) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [-19, 19, 20] X [-12, 20, -4] = | [-476, -316, -152] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 7547 dollars, 10% rate of interest and for a time period of 8 years is = | 6037.6 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
-7-4
-4-9
-37
and
10-24
-6-52
|
-4634-36
1453-34
-72-292
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 66x^2+187x+25=0 | [-0.14, -2.69] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (-1+5j) * (-18+20j) = | (-82-110j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [1, -1, -14] . [17, 6, 20] = | -269 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[37, 76, 39], [67, 82, 13], [61, 73, 79]]) is: | Matrix([[-1843/47252, 3157/141756, 1105/70878], [375/11813, -136/35439, -533/35439], [37/47252, -645/47252, 343/23626]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[91, 18], [68, 24]]) = | 960 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 2610 dollars, 5% rate of interest and for a time period of 1 year is = | 2740.5 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 4x^2 + 4x + 1 = 0 | simplified solution : ((-0.5, -0.5)), generalized solution : ((-4 + 0)/2*4, (-4 - 0)/2*4) | complex_quadratic | -| 105 | Combine Like terms | 1x^2 + 7x^2 + 6x^4 + 5x^4 + 5x^2 | 13x^2 + 11x^4 | combine_like_terms | -| 111 | Expanding Factored Binomial | (-5x-10)(+5x+9) | -25*x^2-95*x-90 | expanding | +| 11 | Basic Algebra | 3x + 8 = 10 | 2/3 | basic_algebra | +| 12 | Logarithm | log3(3) | 1 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 2 * [[6, 4], [10, 9]] = | [[12,8],[20,18]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (3,-15),(8,11)= | (5.5,-2.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2-17x+70 | (x-7)(x-10) | factoring | +| 23 | Solve a System of Equations in R^2 | -2x + 6y = 2, -2x - y = 23 | x = -10, y = -3 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (-6, -8) and (-13, 16) | sqrt(625) | distance_two_points | +| 26 | Linear Equations | 8x + -13y = -111, 11x + -7y = 54 | x = 17, y = 19 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -9/4x + 9 and y = 0/6x - 8 | (68/9, -8) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [9, -10, 20] X [-9, 8, 15] = | [-310, -315, -18] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 4798 dollars, 8% rate of interest and for a time period of 4 years is = | 1535.36 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
6-100
6-41
-97-10
and
-30-9-10
79-2-2
4-10-82
|
-88-90-34-40
-42-46-54-50
3616314756
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 100x^2+147x+38=0 | [-0.33, -1.14] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (-1+16j) * (7-13j) = | (201+125j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [-19, 13, -18] . [-12, -6, -7] = | 276 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[6, 24, 41], [7, 69, 75], [58, 3, 86]]) is: | Matrix([[-1903/13005, 647/13005, 343/13005], [-3748/39015, 1862/39015, 163/39015], [1327/13005, -458/13005, -82/13005]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[95, 84], [5, 32]]) = | 2620 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 9340 dollars, 8% rate of interest and for a time period of 6 year is = | 14821.41 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 7x + 5 = 0 | simplified solution : ((-1.0, -2.5)), generalized solution : ((-7 + 3)/2*2, (-7 - 3)/2*2) | complex_quadratic | +| 105 | Combine Like terms | 8x^2 + 7x^2 + 1x^2 | 16x^2 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-7x-9)(-10x-1) | 70*x^2+97*x+9 | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 49+48= | 97 | addition | -| 1 | Subtraction | 61-29= | 32 | subtraction | -| 2 | Multiplication | 14*1= | 14 | multiplication | -| 3 | Division | 57/19= | 3 | division | -| 6 | Square Root | sqrt(1)= | 1 | square_root | -| 8 | Square | 6^2= | 36 | square | -| 13 | Complex Division | 25/4= | 6.25 | complex_division | -| 16 | Fraction Division | (3/2)/(1/4) | 6 | divide_fractions | -| 28 | Fraction Multiplication | (8/3)*(1/4) | 2/3 | fraction_multiplication | -| 31 | Factorial | 5! = | 120 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 9/8 and 5/4? | < | compare_fractions | -| 47 | Cube Root | cuberoot of 658 upto 2 decimal places is: | 8.7 | cube_root | -| 53 | Exponentiation | 15^10 = | 576650390625 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -6 and -50 = | 44 | absolute_difference | -| 80 | Percentage of a number | What is 55% of 14? | Required percentage = 7.70% | percentage | -| 90 | isprime | 71 | True | is_prime | -| 97 | Power of Powers | The 12^6^4 = 12^(6*4) = 12^24 | 79496847203390844133441536 | power_of_powers | +| 0 | Addition | 13+25= | 38 | addition | +| 1 | Subtraction | 24-15= | 9 | subtraction | +| 2 | Multiplication | 2*28= | 56 | multiplication | +| 3 | Division | 396/22= | 18 | division | +| 6 | Square Root | sqrt(64)= | 8 | square_root | +| 8 | Square | 14^2= | 196 | square | +| 13 | Complex Division | 19/29= | 0.66 | complex_division | +| 16 | Fraction Division | (5/3)/(9/2) | 10/27 | divide_fractions | +| 28 | Fraction Multiplication | (8/3)*(4/1) | 32/3 | fraction_multiplication | +| 31 | Factorial | 1! = | 1 | factorial | +| 44 | Compare Fractions | Which symbol represents the comparison between 6/9 and 1/8? | > | compare_fractions | +| 47 | Cube Root | cuberoot of 5 upto 2 decimal places is: | 1.71 | cube_root | +| 53 | Exponentiation | 13^4 = | 28561 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -51 and -94 = | 43 | absolute_difference | +| 80 | Percentage of a number | What is 71% of 88? | Required percentage = 62.48% | percentage | +| 90 | isprime | 13 | True | is_prime | +| 97 | Power of Powers | The 10^5^10 = 10^(5*10) = 10^50 | 100000000000000000000000000000000000000000000000000 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 9x^10 + 6x^10 + 1x^6 + 10x^3 | 90x^9 + 60x^9 + 6x^5 + 30x^2 | power_rule_differentiation | -| 48 | Power Rule Integration | 3x^10 + 5x^6 + 10x^6 | (3/10)x^11 + (5/6)x^7 + (10/6)x^7 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(ln(x)+5*x^2)/dx | 10*x + 1/x | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 80x^2 + 100x + 5 is = | 81.6667 | definite_integral | -| 110 | Stationary Points | f(x)=10*x^3 + 9*x^2 + 3 | (-3/5,102/25),(0,3) | stationary_points | +| 7 | Power Rule Differentiation | 6x^2 + 4x^10 + 6x^1 + 3x^7 | 12x^1 + 40x^9 + 6x^0 + 21x^6 | power_rule_differentiation | +| 48 | Power Rule Integration | 6x^1 + 6x^1 + 4x^8 + 9x^6 | (6/1)x^2 + (6/1)x^2 + (4/8)x^9 + (9/6)x^7 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(exp(x)+4*x^3)/dx | 12*x^2 + exp(x) | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 14x^2 + 94x + 74 is = | 125.6667 | definite_integral | +| 110 | Stationary Points | f(x)=2*x^2 + 10*x + 5 | (-5/2,-15/2) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 010000= | 101111 | binary_complement_1s | -| 5 | Modulo Division | 87%99= | 87 | modulo_division | -| 14 | Decimal to Binary | Binary of 3= | 11 | decimal_to_binary | -| 15 | Binary to Decimal | 0010110100 | 180 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 7 numbers is ? | [0, 1, 1, 2, 3, 5, 8] | fibonacci_series | -| 62 | nth Fibonacci number | What is the 47th Fibonacci number? | 2971215073 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 000011010 | 0x1a | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of 10011 = | 1101 | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 978= | 0x3d2 | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 2183 in Octal is: | 0o4207 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 6 is = | 26179 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 8980 is = | 2314 | decimal_to_bcd | +| 4 | Binary Complement 1s | 11001011= | 00110100 | binary_complement_1s | +| 5 | Modulo Division | 94%91= | 3 | modulo_division | +| 14 | Decimal to Binary | Binary of 51= | 110011 | decimal_to_binary | +| 15 | Binary to Decimal | 111111 | 63 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 12 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 99th Fibonacci number? | 218922995834555891712 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 0001111 | 0xf | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of 110010011 = | 1101101 | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 916= | 0x394 | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 3202 in Octal is: | 0o6202 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 4151 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 8449 is = | 2101 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 10 8 8 = | 31.22498999199199 | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 3, 49 and 40 exist? | No | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 40 and 55 = | 85 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 10 and 8 = | 12.81 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 13 sides | 152.31 | angle_regular_polygon | -| 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 = 2m, 9m, 3m is | 102 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 10m and radius = 5m is | 471 m^2 | surface_area_cylinder | -| 35 | Volum of Cube | Volume of cube with side = 14m is | 2744 m^3 | volume_cube | -| 36 | Volume of Cuboid | Volume of cuboid with sides = 19m, 4m, 20m is | 1520 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 42m and radius = 17m is | 38132 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 45m and radius = 1m is | 144 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 4m and radius = 11m is | 506 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 81 , 55, 163 = | 61 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is sin(60)? | √3/2 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 9 sides = | 1260 | sum_of_polygon_angles | -| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 6m is | 452.3893421169302 m^2 | surface_area_sphere | -| 61 | Volume of Sphere | Volume of sphere with radius 80 m = | 2144660.584850632 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [956.55, 864.51, 874.49, 333.53, 113.01, 10.44, 653.97, 374.14, 904.82, 608.05, 99.98, 572.65, 354.05, 655.03, 327.04, 853.25, 319.43, 678.41] and [15.79, 792.32, 392.52, 370.7, 283.13, 531.51, 389.19, 480.01, 188.33, 278.59, 964.88, 541.74, 303.95, 941.8, 96.12, 76.43, 864.81, 112.41] is: | 0.88 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 35 and angle, 335. Find the area of the sector. | Area of sector = 3581.19746 | sector_area | -| 86 | Degrees to Radians | Angle 147 in radians is = | 2.57 | degree_to_rad | +| 18 | Area of Triangle | Area of triangle with side lengths: 1 15 20 = | (2.623718239906474e-15+42.8485705712571j) | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 40, 33 and 15 exist? | Yes | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 35 and 10 = | 135 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 20 and 9 = | 21.93 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 20 sides | 162.0 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 8m is | 384 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 16m, 9m, 9m is | 738 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 8m and radius = 7m is | 659 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 = 15m, 13m, 8m is | 1560 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 24m and radius = 12m is | 10857 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 4m and radius = 8m is | 425 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 21m and radius = 14m is | 4310 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 100 , 102, 61 = | 97 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is tan(0)? | 0 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | +| 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 87 m = | 2758330.916222452 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [395.2, 94.94, 487.59, 915.24, 212.71, 151.62, 941.03, 166.04, 137.63, 142.14] and [959.66, 406.65, 510.24, 773.64, 637.71, 431.66, 300.24, 482.26, 290.31, 299.93] is: | 0.69 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 5 and angle, 124. Find the area of the sector. | Area of sector = 27.05260 | sector_area | +| 86 | Degrees to Radians | Angle 267 in radians is = | 4.66 | degree_to_rad | | 87 | Radians to Degrees | Angle 1 in degrees is = | 57.3 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 48 and height, 55? | CSA of cylinder = 16587.61 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 10 sided polygon with lengths of [104, 52, 101, 64, 71, 4, 34, 86, 81, 30]cm is: | 627 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 12 | 75.39822368615503 | circumference | -| 108 | Arc length of Angle | Given radius, 42 and angle, 156. Find the arc length of the angle. | Arc length of the angle = 114.35397 | arc_length | -| 112 | Area of Circle | Area of circle with radius 39 | 4780.285714285714 | area_of_circle | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 34 and height, 64? | CSA of cylinder = 13672.21 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 5 sided polygon with lengths of [17, 118, 88, 80, 100]cm is: | 403 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 92 | 578.0530482605219 | circumference | +| 108 | Arc length of Angle | Given radius, 45 and angle, 198. Find the arc length of the angle. | Arc length of the angle = 155.50884 | arc_length | +| 112 | Area of Circle | Area of circle with radius 66 | 13690.285714285714 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 6 and 20 = | 60 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 2 and 2 = | 2 | gcd | -| 27 | Prime Factorisation | Find prime factors of 100 | [2, 2, 5, 5] | prime_factors | -| 40 | Common Factors | Common Factors of 84 and 41 = | [1] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 3 and 20 = | 1 | hcf | -| 55 | Comparing surds | Fill in the blanks 20^(1/4) _ 26^(1/6) | > | surds_comparison | -| 63 | Profit or Loss Percent | Profit percent when CP = 235 and SP = 844 is: | 259.1489361702128 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [7, 42, 252, 1512, 9072, 54432] ,Find the value of a,common ratio,9th term value, sum upto 8th term | The value of a is 7, common ratio is 6 , 9th term is 11757312 , sum upto 8th term is 2351461.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 2 numbers 74 and 4 = | (74*4)^(1/2) = 17.204650534085253 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 4 numbers 41 , 30 , 67 , 10 = | 4/((1/41) + (1/30) + (1/67) + (1/10)) = 23.168400337362947 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[88.31792181152476, 63.99729325678627, 241.6129026822925, 248.43562116710117, 359.69249783374147, 165.59992609948227, 105.69265168153541] is: | 547.6912694265379 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 47 degrees Celsius to degrees Fahrenheit = | 116.60000000000001 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 72 of the AP series: 50, 91, 132 ... | 2961 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 96 terms of the AP series: -11, 58, 127 ... | 313584.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 3140 in Roman Numerals is: | MMMCXL | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 17.12exp(i1.69) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={8, 4, 7} ,b={1, 2, 5, 7}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 4, 5, 7, 8},Intersection is {7}, a-b is {8, 4},b-a is {1, 2, 5}, Symmetric difference is {1, 2, 4, 5, 8} | set_operation | -| 94 | Base Conversion | Convert B76F from base 16 to base 10. | 46959 | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 2^10 and 2^5 = 2^(10-5) = 2^5 | 32 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 20^3 and 13^3 = (20/13)^3 = 1.5384615384615385^3 | 3.641329085116068 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 1988 | is a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 860 minutes to Hours & Minutes | 14 hours and 20 minutes | minutes_to_hours | -| 106 | signum function | signum of -220 is = | -1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 35.73% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 14 pistons will contain no more than 2 rejected pistons? | 7.57 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 3 and 12 = | 12 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 3 and 9 = | 3 | gcd | +| 27 | Prime Factorisation | Find prime factors of 190 | [2, 5, 19] | prime_factors | +| 40 | Common Factors | Common Factors of 43 and 94 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 18 and 11 = | 1 | hcf | +| 55 | Comparing surds | Fill in the blanks 64^(1/8) _ 38^(1/7) | > | surds_comparison | +| 63 | Profit or Loss Percent | Profit percent when CP = 193 and SP = 876 is: | 353.8860103626943 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [6, 42, 294, 2058, 14406, 100842] ,Find the value of a,common ratio,6th term value, sum upto 8th term | The value of a is 6, common ratio is 7 , 6th term is 100842 , sum upto 8th term is 5764800.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 38 , 65 and 39 = | (38*65*39)^(1/3) = 45.840975768757424 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 14 , 20 and 53 = | 3/((1/14) + (1/20) + (1/53)) = 21.38328530259366 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[317.9880634312611, 628.8368810535857, 407.8183503281746, 822.4501014932654, 319.1817378122325, 161.7987092039548, 908.7922300469593, 4.453912375814051, 796.3181726847199, 696.9354536922802, 651.7673559381681, 511.34562947699845, 824.5863614061724, 76.39867279289648, 489.9631394752603, 607.379368438552, 787.6619389442924, 846.7945116397568, 135.6457464412647] is: | 2598.078695453033 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert 19 degrees Celsius to degrees Fahrenheit = | 66.2 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 30 of the AP series: -8, -106, -204 ... | -2850 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 72 terms of the AP series: 88, 44, 0 ... | -106128.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 3688 in Roman Numerals is: | MMMDCLXXXVIII | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 17.89exp(i0.46) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={2, 3, 5, 7} ,b={1, 5, 8, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 5, 7, 8, 9, 10},Intersection is {5}, a-b is {2, 3, 7},b-a is {8, 1, 10, 9}, Symmetric difference is {1, 2, 3, 7, 8, 9, 10} | set_operation | +| 94 | Base Conversion | Convert AA69 from base 13 to base 2. | 101110011000011 | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 34^9 and 34^6 = 34^(9-6) = 34^3 | 39304 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 26^2 and 36^2 = (26/36)^2 = 0.7222222222222222^2 | 0.5216049382716049 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 2061 | is not a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 409 minutes to Hours & Minutes | 6 hours and 49 minutes | minutes_to_hours | +| 106 | signum function | signum of -824 is = | -1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 31.21% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 14 pistons will contain no more than 1 rejected pistons? | 3.91 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 13 objects picked 7 at a time | 1716 | combinations | -| 42 | Permutations | Number of Permutations from 20 objects picked 5 at a time = | 1860480 | permutation | -| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 16 = | 6/216 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [248, 294, 218, 252, 232, 271, 263, 213, 282, 244, 202, 270, 268, 257, 215, 262, 250, 239, 223, 253] with 80% confidence is | (254.68566484458836, 240.91433515541166) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[45, 33, 42, 7, 43, 38, 28, 26, 20, 48, 44, 46, 12, 39, 25] | The Mean is 33.06666666666667 , Standard Deviation is 154.9955555555556, Variance is 12.449721103524993 | data_summary | -| 76 | Mean and Median | Given the series of numbers [12, 81, 93, 55, 5, 46, 35, 6, 91, 50]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 47.4 and Arithmetic median of this series is 48.0 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 0.52% of population have. Test sensitivity (true positive) is equal to SN= 98.31% whereas test specificity (true negative) SP= 96.83%. What is the probability that this guy really has that disease? | 13.95% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 19 objects picked 3 at a time | 969 | combinations | +| 42 | Permutations | Number of Permutations from 14 objects picked 4 at a time = | 24024 | permutation | +| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 5 = | 6/216 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [228, 226, 239, 289, 229, 209, 230, 213, 236, 235, 206, 243, 272, 293, 264, 201, 214, 207, 257, 240, 299, 283, 262, 284, 260, 222, 237, 273, 220, 247, 276, 271, 245, 259, 277, 290, 238] with 80% confidence is | (253.74831626949535, 242.14357562239653) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[47, 10, 22, 19, 42, 37, 17, 15, 31, 48, 40, 16, 18, 28, 19] | The Mean is 27.266666666666666 , Standard Deviation is 149.2622222222222, Variance is 12.21729193488566 | data_summary | +| 76 | Mean and Median | Given the series of numbers [43, 64, 56, 77, 71, 20, 76, 72, 92, 10]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 58.1 and Arithmetic median of this series is 67.5 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.24% of population have. Test sensitivity (true positive) is equal to SN= 90.15% whereas test specificity (true negative) SP= 93.47%. What is the probability that this guy really has that disease? | 14.77% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index 3a7f8d7..2db7469 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -19,6 +19,7 @@ def write_table_of_contents(): tc_lines = [ '* [Installation](#installation)\n', '* [Basic Usage](#basic-usage)\n', + ' * [More Complicated Usage](#more-complicated-usage)' '* [Documentation](#documentation)\n', '* [List of Generators](#list-of-generators)\n', ] From 6ee6a69cf0f2b774e98077e5e1ccb040846fcbe4 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:13:34 -0500 Subject: [PATCH 08/10] Fix missing newline --- README.md | 3 ++- makeReadme.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b878d05..bce7d8e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ If you have an idea for a generator, please add it as an issue and tag it with t ## Table of Contents * [Installation](#installation) * [Basic Usage](#basic-usage) - * [More Complicated Usage](#more-complicated-usage)* [Documentation](#documentation) + * [More Complicated Usage](#more-complicated-usage) +* [Documentation](#documentation) * [List of Generators](#list-of-generators) * [algebra](#algebra) * [basic_math](#basic_math) diff --git a/makeReadme.py b/makeReadme.py index 2db7469..2b3a990 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -19,7 +19,7 @@ def write_table_of_contents(): tc_lines = [ '* [Installation](#installation)\n', '* [Basic Usage](#basic-usage)\n', - ' * [More Complicated Usage](#more-complicated-usage)' + ' * [More Complicated Usage](#more-complicated-usage)\n' '* [Documentation](#documentation)\n', '* [List of Generators](#list-of-generators)\n', ] From 78429be96f294e0b711eea4a3a5959fe76bd2613 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:18:47 -0500 Subject: [PATCH 09/10] linter fix --- mathgenerator/funcs/algebra/intersection_of_two_lines.py | 1 + mathgenerator/funcs/algebra/quadratic_equation.py | 1 + mathgenerator/funcs/computer_science/nth_fibonacci_number.py | 1 + 3 files changed, 3 insertions(+) diff --git a/mathgenerator/funcs/algebra/intersection_of_two_lines.py b/mathgenerator/funcs/algebra/intersection_of_two_lines.py index a8e0f3c..f3bb678 100644 --- a/mathgenerator/funcs/algebra/intersection_of_two_lines.py +++ b/mathgenerator/funcs/algebra/intersection_of_two_lines.py @@ -2,6 +2,7 @@ from .__init__ import * import fractions + def intersectionOfTwoLinesFunc(minM=-10, maxM=10, minB=-10, diff --git a/mathgenerator/funcs/algebra/quadratic_equation.py b/mathgenerator/funcs/algebra/quadratic_equation.py index da2860f..0a6581e 100644 --- a/mathgenerator/funcs/algebra/quadratic_equation.py +++ b/mathgenerator/funcs/algebra/quadratic_equation.py @@ -2,6 +2,7 @@ from .__init__ import * import math + def quadraticEquation(maxVal=100): a = random.randint(1, maxVal) c = random.randint(1, maxVal) diff --git a/mathgenerator/funcs/computer_science/nth_fibonacci_number.py b/mathgenerator/funcs/computer_science/nth_fibonacci_number.py index 477ff46..273f236 100644 --- a/mathgenerator/funcs/computer_science/nth_fibonacci_number.py +++ b/mathgenerator/funcs/computer_science/nth_fibonacci_number.py @@ -2,6 +2,7 @@ from .__init__ import * import math + def nthFibonacciNumberFunc(maxN=100): golden_ratio = (1 + math.sqrt(5)) / 2 n = random.randint(1, maxN) From 4dd1da2c39f64264f983131ef8550751c5f067bb Mon Sep 17 00:00:00 2001 From: lukew3 Date: Sat, 21 Nov 2020 11:26:10 -0500 Subject: [PATCH 10/10] increased makeReadme.py interpretability --- README.md | 222 +++++++++++++++++++++++++------------------------- makeReadme.py | 37 +++++---- 2 files changed, 130 insertions(+), 129 deletions(-) diff --git a/README.md b/README.md index bce7d8e..f9fc363 100644 --- a/README.md +++ b/README.md @@ -63,134 +63,134 @@ mathgen.write_pdf(worksheet) ## algebra | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 11 | Basic Algebra | 3x + 8 = 10 | 2/3 | basic_algebra | -| 12 | Logarithm | log3(3) | 1 | log | -| 17 | Integer Multiplication with 2x2 Matrix | 2 * [[6, 4], [10, 9]] = | [[12,8],[20,18]] | multiply_int_to_22_matrix | -| 20 | Midpoint of the two point | (3,-15),(8,11)= | (5.5,-2.0) | midpoint_of_two_points | -| 21 | Factoring Quadratic | x^2-17x+70 | (x-7)(x-10) | factoring | -| 23 | Solve a System of Equations in R^2 | -2x + 6y = 2, -2x - y = 23 | x = -10, y = -3 | system_of_equations | -| 24 | Distance between 2 points | Find the distance between (-6, -8) and (-13, 16) | sqrt(625) | distance_two_points | -| 26 | Linear Equations | 8x + -13y = -111, 11x + -7y = 54 | x = 17, y = 19 | linear_equations | -| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = -9/4x + 9 and y = 0/6x - 8 | (68/9, -8) | intersection_of_two_lines | -| 43 | Cross Product of 2 Vectors | [9, -10, 20] X [-9, 8, 15] = | [-310, -315, -18] | vector_cross | -| 45 | Simple Interest | Simple interest for a principle amount of 4798 dollars, 8% rate of interest and for a time period of 4 years is = | 1535.36 | simple_interest | -| 46 | Multiplication of two matrices | Multiply
6-100
6-41
-97-10
and
-30-9-10
79-2-2
4-10-82
|
-88-90-34-40
-42-46-54-50
3616314756
| matrix_multiplication | -| 50 | Quadratic Equation | Zeros of the Quadratic Equation 100x^2+147x+38=0 | [-0.33, -1.14] | quadratic_equation | -| 65 | Multiplication of 2 complex numbers | (-1+16j) * (7-13j) = | (201+125j) | multiply_complex_numbers | -| 72 | Dot Product of 2 Vectors | [-19, 13, -18] . [-12, -6, -7] = | 276 | vector_dot | -| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[6, 24, 41], [7, 69, 75], [58, 3, 86]]) is: | Matrix([[-1903/13005, 647/13005, 343/13005], [-3748/39015, 1862/39015, 163/39015], [1327/13005, -458/13005, -82/13005]]) | invert_matrix | -| 77 | Determinant to 2x2 Matrix | Det([[95, 84], [5, 32]]) = | 2620 | int_matrix_22_determinant | -| 78 | Compound Interest | Compound interest for a principle amount of 9340 dollars, 8% rate of interest and for a time period of 6 year is = | 14821.41 | compound_interest | -| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 7x + 5 = 0 | simplified solution : ((-1.0, -2.5)), generalized solution : ((-7 + 3)/2*2, (-7 - 3)/2*2) | complex_quadratic | -| 105 | Combine Like terms | 8x^2 + 7x^2 + 1x^2 | 16x^2 | combine_like_terms | -| 111 | Expanding Factored Binomial | (-7x-9)(-10x-1) | 70*x^2+97*x+9 | expanding | +| 11 | Basic Algebra | 10x + 4 = 8 | 2/5 | basic_algebra | +| 12 | Logarithm | log2(16) | 4 | log | +| 17 | Integer Multiplication with 2x2 Matrix | 5 * [[9, 7], [8, 7]] = | [[45,35],[40,35]] | multiply_int_to_22_matrix | +| 20 | Midpoint of the two point | (-2,-6),(8,-10)= | (3.0,-8.0) | midpoint_of_two_points | +| 21 | Factoring Quadratic | x^2-7x-8 | (x+1)(x-8) | factoring | +| 23 | Solve a System of Equations in R^2 | 4x + 8y = 40, -2x - 4y = -20 | x = 8, y = 1 | system_of_equations | +| 24 | Distance between 2 points | Find the distance between (14, -2) and (17, 4) | sqrt(45) | distance_two_points | +| 26 | Linear Equations | 7x + 4y = -144, -19x + 15y = 365 | x = -20, y = -1 | linear_equations | +| 41 | Intersection of Two Lines | Find the point of intersection of the two lines: y = 4x - 9 and y = -2x + 1 | (5/3, -7/3) | intersection_of_two_lines | +| 43 | Cross Product of 2 Vectors | [-14, 15, -1] X [-7, 1, 6] = | [91, 91, 91] | vector_cross | +| 45 | Simple Interest | Simple interest for a principle amount of 2349 dollars, 4% rate of interest and for a time period of 9 years is = | 845.64 | simple_interest | +| 46 | Multiplication of two matrices | Multiply
86
-89
23
10-1
and
-8-10-1
-4-1-1
|
-88-86-14
2871-1
-28-23-5
-76-99-9
| matrix_multiplication | +| 50 | Quadratic Equation | Zeros of the Quadratic Equation 4x^2+120x+5=0 | [-0.04, -29.96] | quadratic_equation | +| 65 | Multiplication of 2 complex numbers | (-7-9j) * (19+8j) = | (-61-227j) | multiply_complex_numbers | +| 72 | Dot Product of 2 Vectors | [11, -4, 2] . [-1, 1, 19] = | 23 | vector_dot | +| 74 | Inverse of a Matrix | Inverse of Matrix Matrix([[43, 67, 81], [23, 71, 79], [70, 96, 7]]) is: | Matrix([[7087/168740, -7307/168740, 229/84370], [-7/220, 7/220, 1/110], [1381/84370, -281/84370, -378/42185]]) | invert_matrix | +| 77 | Determinant to 2x2 Matrix | Det([[31, 16], [92, 93]]) = | 1411 | int_matrix_22_determinant | +| 78 | Compound Interest | Compound interest for a principle amount of 6310 dollars, 1% rate of interest and for a time period of 2 year is = | 6436.83 | compound_interest | +| 100 | complex Quadratic Equation | Find the roots of given Quadratic Equation 2x^2 + 6x + 4 = 0 | simplified solution : ((-1.0, -2.0)), generalized solution : ((-6 + 2)/2*2, (-6 - 2)/2*2) | complex_quadratic | +| 105 | Combine Like terms | 3x^2 + 3x^1 + 1x^2 | 3x^1 + 4x^2 | combine_like_terms | +| 111 | Expanding Factored Binomial | (-7x)(-4x-1) | 28*x^2+7*x | expanding | ## basic_math | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 0 | Addition | 13+25= | 38 | addition | -| 1 | Subtraction | 24-15= | 9 | subtraction | -| 2 | Multiplication | 2*28= | 56 | multiplication | -| 3 | Division | 396/22= | 18 | division | -| 6 | Square Root | sqrt(64)= | 8 | square_root | +| 0 | Addition | 21+24= | 45 | addition | +| 1 | Subtraction | 17-4= | 13 | subtraction | +| 2 | Multiplication | 87*0= | 0 | multiplication | +| 3 | Division | 136/17= | 8 | division | +| 6 | Square Root | sqrt(16)= | 4 | square_root | | 8 | Square | 14^2= | 196 | square | -| 13 | Complex Division | 19/29= | 0.66 | complex_division | -| 16 | Fraction Division | (5/3)/(9/2) | 10/27 | divide_fractions | -| 28 | Fraction Multiplication | (8/3)*(4/1) | 32/3 | fraction_multiplication | +| 13 | Complex Division | 76/53= | 1.43 | complex_division | +| 16 | Fraction Division | (9/10)/(2/7) | 63/20 | divide_fractions | +| 28 | Fraction Multiplication | (3/9)*(1/3) | 1/9 | fraction_multiplication | | 31 | Factorial | 1! = | 1 | factorial | -| 44 | Compare Fractions | Which symbol represents the comparison between 6/9 and 1/8? | > | compare_fractions | -| 47 | Cube Root | cuberoot of 5 upto 2 decimal places is: | 1.71 | cube_root | -| 53 | Exponentiation | 13^4 = | 28561 | exponentiation | -| 71 | Absolute difference between two numbers | Absolute difference between numbers -51 and -94 = | 43 | absolute_difference | -| 80 | Percentage of a number | What is 71% of 88? | Required percentage = 62.48% | percentage | -| 90 | isprime | 13 | True | is_prime | -| 97 | Power of Powers | The 10^5^10 = 10^(5*10) = 10^50 | 100000000000000000000000000000000000000000000000000 | power_of_powers | +| 44 | Compare Fractions | Which symbol represents the comparison between 3/5 and 4/10? | > | compare_fractions | +| 47 | Cube Root | cuberoot of 127 upto 2 decimal places is: | 5.03 | cube_root | +| 53 | Exponentiation | 8^4 = | 4096 | exponentiation | +| 71 | Absolute difference between two numbers | Absolute difference between numbers -67 and 11 = | 78 | absolute_difference | +| 80 | Percentage of a number | What is 51% of 89? | Required percentage = 45.39% | percentage | +| 90 | isprime | 32 | False | is_prime | +| 97 | Power of Powers | The 23^7^4 = 23^(7*4) = 23^28 | 134393854047545109686936775588697536481 | power_of_powers | ## calculus | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 7 | Power Rule Differentiation | 6x^2 + 4x^10 + 6x^1 + 3x^7 | 12x^1 + 40x^9 + 6x^0 + 21x^6 | power_rule_differentiation | -| 48 | Power Rule Integration | 6x^1 + 6x^1 + 4x^8 + 9x^6 | (6/1)x^2 + (6/1)x^2 + (4/8)x^9 + (9/6)x^7 + c | power_rule_integration | -| 88 | Differentiation | differentiate w.r.t x : d(exp(x)+4*x^3)/dx | 12*x^2 + exp(x) | differentiation | -| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 14x^2 + 94x + 74 is = | 125.6667 | definite_integral | -| 110 | Stationary Points | f(x)=2*x^2 + 10*x + 5 | (-5/2,-15/2) | stationary_points | +| 7 | Power Rule Differentiation | 4x^10 + 1x^7 + 9x^8 + 2x^9 | 40x^9 + 7x^6 + 72x^7 + 18x^8 | power_rule_differentiation | +| 48 | Power Rule Integration | 9x^1 + 3x^2 + 1x^7 | (9/1)x^2 + (3/2)x^3 + (1/7)x^8 + c | power_rule_integration | +| 88 | Differentiation | differentiate w.r.t x : d(cot(x)+3*x^(-2))/dx | -cot(x)^2 - 1 - 6/x^3 | differentiation | +| 89 | Definite Integral of Quadratic Equation | The definite integral within limits 0 to 1 of the equation 72x^2 + 6x + 55 is = | 82.0 | definite_integral | +| 110 | Stationary Points | f(x)=x^3 + 9*x^2 + 3*x + 3 | (-3 - 2*sqrt(2),(-3 - 2*sqrt(2))**3 - 6*sqrt(2) - 6 + 9*(-3 - 2*sqrt(2))**2),(-3 + 2*sqrt(2),-6 + (-3 + 2*sqrt(2))**3 + 9*(-3 + 2*sqrt(2))**2 + 6*sqrt(2)) | stationary_points | ## computer_science | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 4 | Binary Complement 1s | 11001011= | 00110100 | binary_complement_1s | -| 5 | Modulo Division | 94%91= | 3 | modulo_division | -| 14 | Decimal to Binary | Binary of 51= | 110011 | decimal_to_binary | -| 15 | Binary to Decimal | 111111 | 63 | binary_to_decimal | -| 56 | Fibonacci Series | The Fibonacci Series of the first 12 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] | fibonacci_series | -| 62 | nth Fibonacci number | What is the 99th Fibonacci number? | 218922995834555891712 | nth_fibonacci_number | -| 64 | Binary to Hexidecimal | 0001111 | 0xf | binary_to_hex | -| 73 | Binary 2's Complement | 2's complement of 110010011 = | 1101101 | binary_2s_complement | -| 79 | Decimal to Hexadecimal | Binary of 916= | 0x394 | decimal_to_hexadeci | -| 84 | Converts decimal to octal | The decimal number 3202 in Octal is: | 0o6202 | decimal_to_octal | -| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 4151 | bcd_to_decimal | -| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 8449 is = | 2101 | decimal_to_bcd | +| 4 | Binary Complement 1s | 011= | 100 | binary_complement_1s | +| 5 | Modulo Division | 79%59= | 20 | modulo_division | +| 14 | Decimal to Binary | Binary of 3= | 11 | decimal_to_binary | +| 15 | Binary to Decimal | 111100 | 60 | binary_to_decimal | +| 56 | Fibonacci Series | The Fibonacci Series of the first 15 numbers is ? | [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377] | fibonacci_series | +| 62 | nth Fibonacci number | What is the 80th Fibonacci number? | 23416728348467744 | nth_fibonacci_number | +| 64 | Binary to Hexidecimal | 11 | 0x3 | binary_to_hex | +| 73 | Binary 2's Complement | 2's complement of = | | binary_2s_complement | +| 79 | Decimal to Hexadecimal | Binary of 308= | 0x134 | decimal_to_hexadeci | +| 84 | Converts decimal to octal | The decimal number 4031 in Octal is: | 0o7677 | decimal_to_octal | +| 91 | Binary Coded Decimal to Integer | Integer of Binary Coded Decimal 1 is = | 5416 | bcd_to_decimal | +| 103 | Decimal to Binary Coded Decimal | BCD of Decimal Number 4889 is = | 1319 | decimal_to_bcd | ## geometry | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 18 | Area of Triangle | Area of triangle with side lengths: 1 15 20 = | (2.623718239906474e-15+42.8485705712571j) | area_of_triangle | -| 19 | Triangle exists check | Does triangle with sides 40, 33 and 15 exist? | Yes | valid_triangle | -| 22 | Third Angle of Triangle | Third angle of triangle with angles 35 and 10 = | 135 | third_angle_of_triangle | -| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 20 and 9 = | 21.93 | pythagorean_theorem | -| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 20 sides | 162.0 | angle_regular_polygon | -| 32 | Surface Area of Cube | Surface area of cube with side = 8m is | 384 m^2 | surface_area_cube | -| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 16m, 9m, 9m is | 738 m^2 | surface_area_cuboid | -| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 8m and radius = 7m is | 659 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 = 15m, 13m, 8m is | 1560 m^3 | volume_cuboid | -| 37 | Volume of cylinder | Volume of cylinder with height = 24m and radius = 12m is | 10857 m^3 | volume_cylinder | -| 38 | Surface Area of cone | Surface area of cone with height = 4m and radius = 8m is | 425 m^2 | surface_area_cone | -| 39 | Volume of cone | Volume of cone with height = 21m and radius = 14m is | 4310 m^3 | volume_cone | -| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 100 , 102, 61 = | 97 | fourth_angle_of_quadrilateral | -| 57 | Trigonometric Values | What is tan(0)? | 0 | basic_trigonometry | -| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 12 sides = | 1800 | sum_of_polygon_angles | -| 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 87 m = | 2758330.916222452 m^3 | volume_sphere | -| 70 | Angle between 2 vectors | angle between the vectors [395.2, 94.94, 487.59, 915.24, 212.71, 151.62, 941.03, 166.04, 137.63, 142.14] and [959.66, 406.65, 510.24, 773.64, 637.71, 431.66, 300.24, 482.26, 290.31, 299.93] is: | 0.69 radians | angle_btw_vectors | -| 75 | Area of a Sector | Given radius, 5 and angle, 124. Find the area of the sector. | Area of sector = 27.05260 | sector_area | -| 86 | Degrees to Radians | Angle 267 in radians is = | 4.66 | degree_to_rad | -| 87 | Radians to Degrees | Angle 1 in degrees is = | 57.3 | radian_to_deg | -| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 34 and height, 64? | CSA of cylinder = 13672.21 | curved_surface_area_cylinder | -| 96 | Perimeter of Polygons | The perimeter of a 5 sided polygon with lengths of [17, 118, 88, 80, 100]cm is: | 403 | perimeter_of_polygons | -| 104 | Circumference | Circumference of circle with radius 92 | 578.0530482605219 | circumference | -| 108 | Arc length of Angle | Given radius, 45 and angle, 198. Find the arc length of the angle. | Arc length of the angle = 155.50884 | arc_length | -| 112 | Area of Circle | Area of circle with radius 66 | 13690.285714285714 | area_of_circle | +| 18 | Area of Triangle | Area of triangle with side lengths: 6 8 19 = | (3.715326154880634e-15+60.675880710542636j) | area_of_triangle | +| 19 | Triangle exists check | Does triangle with sides 8, 30 and 7 exist? | No | valid_triangle | +| 22 | Third Angle of Triangle | Third angle of triangle with angles 30 and 54 = | 96 | third_angle_of_triangle | +| 25 | Pythagorean Theorem | The hypotenuse of a right triangle given the other two lengths 20 and 4 = | 20.40 | pythagorean_theorem | +| 29 | Angle of a Regular Polygon | Find the angle of a regular polygon with 14 sides | 154.29 | angle_regular_polygon | +| 32 | Surface Area of Cube | Surface area of cube with side = 7m is | 294 m^2 | surface_area_cube | +| 33 | Surface Area of Cuboid | Surface area of cuboid with sides = 3m, 1m, 15m is | 126 m^2 | surface_area_cuboid | +| 34 | Surface Area of Cylinder | Surface area of cylinder with height = 27m and radius = 9m is | 2035 m^2 | surface_area_cylinder | +| 35 | Volum of Cube | Volume of cube with side = 7m is | 343 m^3 | volume_cube | +| 36 | Volume of Cuboid | Volume of cuboid with sides = 11m, 6m, 3m is | 198 m^3 | volume_cuboid | +| 37 | Volume of cylinder | Volume of cylinder with height = 34m and radius = 20m is | 42725 m^3 | volume_cylinder | +| 38 | Surface Area of cone | Surface area of cone with height = 31m and radius = 14m is | 2111 m^2 | surface_area_cone | +| 39 | Volume of cone | Volume of cone with height = 23m and radius = 1m is | 24 m^3 | volume_cone | +| 49 | Fourth Angle of Quadrilateral | Fourth angle of quadrilateral with angles 117 , 34, 65 = | 144 | fourth_angle_of_quadrilateral | +| 57 | Trigonometric Values | What is sin(60)? | √3/2 | basic_trigonometry | +| 58 | Sum of Angles of Polygon | Sum of angles of polygon with 4 sides = | 360 | sum_of_polygon_angles | +| 60 | Surface Area of Sphere | Surface area of Sphere with radius = 13m is | 2123.7166338267 m^2 | surface_area_sphere | +| 61 | Volume of Sphere | Volume of sphere with radius 9 m = | 3053.628059289279 m^3 | volume_sphere | +| 70 | Angle between 2 vectors | angle between the vectors [125.74, 310.83] and [290.27, 233.14] is: | 0.51 radians | angle_btw_vectors | +| 75 | Area of a Sector | Given radius, 41 and angle, 1. Find the area of the sector. | Area of sector = 14.66949 | sector_area | +| 86 | Degrees to Radians | Angle 244 in radians is = | 4.26 | degree_to_rad | +| 87 | Radians to Degrees | Angle 3 in degrees is = | 171.89 | radian_to_deg | +| 95 | Curved surface area of a cylinder | What is the curved surface area of a cylinder of radius, 16 and height, 41? | CSA of cylinder = 4121.77 | curved_surface_area_cylinder | +| 96 | Perimeter of Polygons | The perimeter of a 3 sided polygon with lengths of [117, 20, 100]cm is: | 237 | perimeter_of_polygons | +| 104 | Circumference | Circumference of circle with radius 22 | 138.23007675795088 | circumference | +| 108 | Arc length of Angle | Given radius, 15 and angle, 88. Find the arc length of the angle. | Arc length of the angle = 23.03835 | arc_length | +| 112 | Area of Circle | Area of circle with radius 9 | 254.57142857142856 | area_of_circle | ## misc | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 9 | LCM (Least Common Multiple) | LCM of 3 and 12 = | 12 | lcm | -| 10 | GCD (Greatest Common Denominator) | GCD of 3 and 9 = | 3 | gcd | -| 27 | Prime Factorisation | Find prime factors of 190 | [2, 5, 19] | prime_factors | -| 40 | Common Factors | Common Factors of 43 and 94 = | [1] | common_factors | -| 51 | HCF (Highest Common Factor) | HCF of 18 and 11 = | 1 | hcf | -| 55 | Comparing surds | Fill in the blanks 64^(1/8) _ 38^(1/7) | > | surds_comparison | -| 63 | Profit or Loss Percent | Profit percent when CP = 193 and SP = 876 is: | 353.8860103626943 | profit_loss_percent | -| 66 | Geometric Progression | For the given GP [6, 42, 294, 2058, 14406, 100842] ,Find the value of a,common ratio,6th term value, sum upto 8th term | The value of a is 6, common ratio is 7 , 6th term is 100842 , sum upto 8th term is 5764800.0 | geometric_progression | -| 67 | Geometric Mean of N Numbers | Geometric mean of 3 numbers 38 , 65 and 39 = | (38*65*39)^(1/3) = 45.840975768757424 | geometric_mean | -| 68 | Harmonic Mean of N Numbers | Harmonic mean of 3 numbers 14 , 20 and 53 = | 3/((1/14) + (1/20) + (1/53)) = 21.38328530259366 | harmonic_mean | -| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[317.9880634312611, 628.8368810535857, 407.8183503281746, 822.4501014932654, 319.1817378122325, 161.7987092039548, 908.7922300469593, 4.453912375814051, 796.3181726847199, 696.9354536922802, 651.7673559381681, 511.34562947699845, 824.5863614061724, 76.39867279289648, 489.9631394752603, 607.379368438552, 787.6619389442924, 846.7945116397568, 135.6457464412647] is: | 2598.078695453033 | euclidian_norm | -| 81 | Celsius To Fahrenheit | Convert 19 degrees Celsius to degrees Fahrenheit = | 66.2 | celsius_to_fahrenheit | -| 82 | AP Term Calculation | Find the term number 30 of the AP series: -8, -106, -204 ... | -2850 | arithmetic_progression_term | -| 83 | AP Sum Calculation | Find the sum of first 72 terms of the AP series: 88, 44, 0 ... | -106128.0 | arithmetic_progression_sum | -| 85 | Converts decimal to Roman Numerals | The number 3688 in Roman Numerals is: | MMMDCLXXXVIII | decimal_to_roman_numerals | -| 92 | Complex To Polar Form | rexp(itheta) = | 17.89exp(i0.46) | complex_to_polar | -| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={2, 3, 5, 7} ,b={1, 5, 8, 9, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {1, 2, 3, 5, 7, 8, 9, 10},Intersection is {5}, a-b is {2, 3, 7},b-a is {8, 1, 10, 9}, Symmetric difference is {1, 2, 3, 7, 8, 9, 10} | set_operation | -| 94 | Base Conversion | Convert AA69 from base 13 to base 2. | 101110011000011 | base_conversion | -| 98 | Quotient of Powers with Same Base | The Quotient of 34^9 and 34^6 = 34^(9-6) = 34^3 | 39304 | quotient_of_power_same_base | -| 99 | Quotient of Powers with Same Power | The Quotient of 26^2 and 36^2 = (26/36)^2 = 0.7222222222222222^2 | 0.5216049382716049 | quotient_of_power_same_power | -| 101 | Leap Year or Not | Year 2061 | is not a leap year | is_leap_year | -| 102 | Minute to Hour conversion | Convert 409 minutes to Hours & Minutes | 6 hours and 49 minutes | minutes_to_hours | -| 106 | signum function | signum of -824 is = | -1 | signum_function | -| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 31.21% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 14 pistons will contain no more than 1 rejected pistons? | 3.91 | binomial_distribution | +| 9 | LCM (Least Common Multiple) | LCM of 6 and 13 = | 78 | lcm | +| 10 | GCD (Greatest Common Denominator) | GCD of 6 and 19 = | 1 | gcd | +| 27 | Prime Factorisation | Find prime factors of 88 | [2, 2, 2, 11] | prime_factors | +| 40 | Common Factors | Common Factors of 5 and 1 = | [1] | common_factors | +| 51 | HCF (Highest Common Factor) | HCF of 12 and 16 = | 4 | hcf | +| 55 | Comparing surds | Fill in the blanks 38^(1/3) _ 72^(1/7) | > | surds_comparison | +| 63 | Profit or Loss Percent | Loss percent when CP = 890 and SP = 392 is: | 55.955056179775276 | profit_loss_percent | +| 66 | Geometric Progression | For the given GP [3, 27, 243, 2187, 19683, 177147] ,Find the value of a,common ratio,8th term value, sum upto 8th term | The value of a is 3, common ratio is 9 , 8th term is 14348907 , sum upto 8th term is 16142520.0 | geometric_progression | +| 67 | Geometric Mean of N Numbers | Geometric mean of 4 numbers 68 , 99 , 69 , 94 = | (68*99*69*94)^(1/4) = 81.28871585461766 | geometric_mean | +| 68 | Harmonic Mean of N Numbers | Harmonic mean of 2 numbers 36 and 89 = | 2/((1/36) + (1/89)) = 51.264 | harmonic_mean | +| 69 | Euclidian norm or L2 norm of a vector | Euclidian norm or L2 norm of the vector[500.9951948616654, 42.203693843008814, 503.055665827151, 997.8018016538981, 720.8110612915443, 219.71485715574812, 445.67377783903027] is: | 1505.9611867978413 | euclidian_norm | +| 81 | Celsius To Fahrenheit | Convert -40 degrees Celsius to degrees Fahrenheit = | -40.0 | celsius_to_fahrenheit | +| 82 | AP Term Calculation | Find the term number 82 of the AP series: -86, -93, -100 ... | -653 | arithmetic_progression_term | +| 83 | AP Sum Calculation | Find the sum of first 71 terms of the AP series: -62, -8, 46 ... | 129788.0 | arithmetic_progression_sum | +| 85 | Converts decimal to Roman Numerals | The number 1282 in Roman Numerals is: | MCCLXXXII | decimal_to_roman_numerals | +| 92 | Complex To Polar Form | rexp(itheta) = | 16.12exp(i-1.05) | complex_to_polar | +| 93 | Union,Intersection,Difference of Two Sets | Given the two sets a={10, 2, 5, 7} ,b={2, 3, 6, 8, 10}.Find the Union,intersection,a-b,b-a and symmetric difference | Union is {2, 3, 5, 6, 7, 8, 10},Intersection is {10, 2}, a-b is {5, 7},b-a is {8, 3, 6}, Symmetric difference is {3, 5, 6, 7, 8} | set_operation | +| 94 | Base Conversion | Convert E079 from base 16 to base 2. | 1110000001111001 | base_conversion | +| 98 | Quotient of Powers with Same Base | The Quotient of 48^6 and 48^7 = 48^(6-7) = 48^-1 | 0.020833333333333332 | quotient_of_power_same_base | +| 99 | Quotient of Powers with Same Power | The Quotient of 2^3 and 17^3 = (2/17)^3 = 0.11764705882352941^3 | 0.001628332994097293 | quotient_of_power_same_power | +| 101 | Leap Year or Not | Year 2016 | is a leap year | is_leap_year | +| 102 | Minute to Hour conversion | Convert 509 minutes to Hours & Minutes | 8 hours and 29 minutes | minutes_to_hours | +| 106 | signum function | signum of 750 is = | 1 | signum_function | +| 109 | Binomial distribution | A manufacturer of metal pistons finds that, on average, 39.24% of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 15 pistons will contain no more than 7 rejected pistons? | 80.44 | binomial_distribution | ## statistics | Id | Skill | Example problem | Example Solution | Function Name | |------|-------|-----------------|------------------|---------------| -| 30 | Combinations of Objects | Number of combinations from 19 objects picked 3 at a time | 969 | combinations | -| 42 | Permutations | Number of Permutations from 14 objects picked 4 at a time = | 24024 | permutation | -| 52 | Probability of a certain sum appearing on faces of dice | If 3 dice are rolled at the same time, the probability of getting a sum of 5 = | 6/216 | dice_sum_probability | -| 54 | Confidence interval For sample S | The confidence interval for sample [228, 226, 239, 289, 229, 209, 230, 213, 236, 235, 206, 243, 272, 293, 264, 201, 214, 207, 257, 240, 299, 283, 262, 284, 260, 222, 237, 273, 220, 247, 276, 271, 245, 259, 277, 290, 238] with 80% confidence is | (253.74831626949535, 242.14357562239653) | confidence_interval | -| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[47, 10, 22, 19, 42, 37, 17, 15, 31, 48, 40, 16, 18, 28, 19] | The Mean is 27.266666666666666 , Standard Deviation is 149.2622222222222, Variance is 12.21729193488566 | data_summary | -| 76 | Mean and Median | Given the series of numbers [43, 64, 56, 77, 71, 20, 76, 72, 92, 10]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 58.1 and Arithmetic median of this series is 67.5 | mean_median | -| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 1.24% of population have. Test sensitivity (true positive) is equal to SN= 90.15% whereas test specificity (true negative) SP= 93.47%. What is the probability that this guy really has that disease? | 14.77% | conditional_probability | +| 30 | Combinations of Objects | Number of combinations from 12 objects picked 3 at a time | 220 | combinations | +| 42 | Permutations | Number of Permutations from 13 objects picked 1 at a time = | 13 | permutation | +| 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 6 = | 5/36 | dice_sum_probability | +| 54 | Confidence interval For sample S | The confidence interval for sample [270, 279, 280, 228, 245, 203, 254, 207, 218, 243, 205, 258, 244, 288, 278, 269, 216, 297, 215, 277, 296, 282, 257, 242, 246, 274, 224, 299, 239, 230, 225, 295, 284] with 99% confidence is | (266.76150517633465, 240.3294039145744) | confidence_interval | +| 59 | Mean,Standard Deviation,Variance | Find the mean,standard deviation and variance for the data[44, 7, 14, 15, 20, 43, 46, 29, 13, 15, 22, 45, 6, 24, 25] | The Mean is 24.533333333333335 , Standard Deviation is 181.58222222222224, Variance is 13.475244792664148 | data_summary | +| 76 | Mean and Median | Given the series of numbers [76, 34, 10, 78, 55, 74, 54, 91, 19, 39]. find the arithmatic mean and mdian of the series | Arithmetic mean of the series is 53.0 and Arithmetic median of this series is 54.5 | mean_median | +| 107 | Conditional Probability | Someone tested positive for a nasty disease which only 0.47% of population have. Test sensitivity (true positive) is equal to SN= 93.50% whereas test specificity (true negative) SP= 98.52%. What is the probability that this guy really has that disease? | 22.98% | conditional_probability | diff --git a/makeReadme.py b/makeReadme.py index 2b3a990..61a1744 100644 --- a/makeReadme.py +++ b/makeReadme.py @@ -2,6 +2,7 @@ from mathgenerator.mathgen import * write_list = [] subjects = ['algebra', 'basic_math', 'calculus', 'computer_science', 'geometry', 'misc', 'statistics'] +wList = getGenList() def array2markdown_table(string): string = string.replace("[[", "
") @@ -46,7 +47,7 @@ def write_table_of_contents(): with open('README.md', "w") as g: g.writelines(lines) -def write_row(item): +def gen_to_row_string(item): myGen = item[2] # NOTE: renamed 'sol' to 'solu' to make it look nicer prob, solu = myGen() @@ -90,27 +91,27 @@ def write_subject_table(subject_name, full_gen_list): # Add each item to write_list for item in subject_list: - write_list.append(write_row(item)) + write_list.append(gen_to_row_string(item)) -wList = getGenList() -lines = [] +def main(): + write_table_of_contents() + for subject in subjects: + write_subject_table(subject, wList) + + with open('README.md', "r") as g: + lines = g.readlines() -write_table_of_contents() + line = lines.index('## List of Generators\n') + lines = lines[:line + 1] -for subject in subjects: - write_subject_table(subject, wList) + for write_line in write_list: + lines.append(write_line) -with open('README.md', "r") as g: - lines = g.readlines() + with open('README.md', "w") as g: + g.writelines(lines) - line = lines.index('## List of Generators\n') - lines = lines[:line + 1] + print("New README.md table generated") - for write_line in write_list: - lines.append(write_line) - -with open('README.md', "w") as g: - g.writelines(lines) - -print("New README.md table generated") +if __name__ == "__main__": + main()