Remove general problem and solution from generator object

This commit is contained in:
lukew3
2021-10-02 23:52:10 -04:00
parent a6dbd2cf9f
commit 6b35cbb452
114 changed files with 78 additions and 186 deletions

View File

@@ -10,11 +10,9 @@ genList = []
class Generator:
def __init__(self, title, id, generalProb, generalSol, func, kwargs):
def __init__(self, title, id, func, kwargs):
self.title = title
self.id = id
self.generalProb = generalProb
self.generalSol = generalSol
self.func = func
self.kwargs = kwargs
@@ -30,7 +28,7 @@ class Generator:
def __str__(self):
return str(
self.id
) + " " + self.title + " " + self.generalProb + " " + self.generalSol
) + " " + self.title
def __call__(self, *args, **kwargs):
try:

View File

@@ -29,5 +29,5 @@ def basicAlgebraFunc(maxVariable=10, style='raw'):
return problem, solution
basic_algebra = Generator("Basic Algebra", 11, "ax + b = c", "d",
basic_algebra = Generator("Basic Algebra", 11,
basicAlgebraFunc, ["maxVariable=10"])

View File

@@ -41,5 +41,4 @@ def combineTerms(string):
return final_string
combine_like_terms = Generator("Combine Like terms", 105, "nx^m+lx^k+bx^m",
"(n+b)x^m+lx^k", likeTermCombineFunc, ["maxCoef=10", "maxExp=20", "maxTerms=10"])
combine_like_terms = Generator("Combine Like terms", 105,likeTermCombineFunc, ["maxCoef=10", "maxExp=20", "maxTerms=10"])

View File

@@ -70,7 +70,5 @@ def complexQuadraticFunc(prob_type=0, max_range=10):
complex_quadratic = Generator(
"complex Quadratic Equation", 100,
"Find the roots of given Quadratic Equation ",
"simplified solution : (x1, x2), generalized solution : ((-b + sqrt(d))/2a, (-b - sqrt(d))/2a) or ((-b + sqrt(d)i)/2a, (-b - sqrt(d)i)/2a)",
complexQuadraticFunc,
["prob_type=0", "max_range=10"])

View File

@@ -15,7 +15,5 @@ def compoundInterestFunc(maxPrinciple=10000, maxRate=10, maxTime=10):
compound_interest = Generator(
"Compound Interest", 78,
"Compound interest for a principle amount of a dollars, b% rate of interest and for a time period of c years is = ",
"d dollars",
compoundInterestFunc,
["maxPrinciple=10000", "maxRate=10", "maxTime=10"])

View File

@@ -16,6 +16,5 @@ def distanceTwoPointsFunc(maxValXY=20, minValXY=-20):
distance_two_points = Generator(
"Distance between 2 points", 24,
"Find the distance between (x1,y1) and (x2,y2)", "sqrt(distanceSquared)",
distanceTwoPointsFunc,
["maxValXY=20", "minValXY=-20"])

View File

@@ -44,6 +44,5 @@ def expandingFunc(range_x1=10, range_x2=10, range_a=10, range_b=10):
return problem, solution
expanding = Generator("Expanding Factored Binomial", 111, "(a*x-x1)(b*x-x2)",
"a*b*x^2+(b*x1+a*x2)*x+x1*x2", expandingFunc,
expanding = Generator("Expanding Factored Binomial", 111, expandingFunc,
["range_x1=10", "range_x2=10", "range_a=10", "range_b=10"])

View File

@@ -29,6 +29,5 @@ def factoringFunc(range_x1=10, range_x2=10):
return problem, solution
factoring = Generator("Factoring Quadratic", 21, "x^2+(x1+x2)+x1*x2",
"(x-x1)(x-x2)", factoringFunc,
factoring = Generator("Factoring Quadratic", 21, factoringFunc,
["range_x1=10", "range_x2=10"])

View File

@@ -14,6 +14,5 @@ def determinantToMatrix22(maxMatrixVal=100):
int_matrix_22_determinant = Generator("Determinant to 2x2 Matrix", 77,
"Det([[a,b],[c,d]]) =", " a * d - b * c",
determinantToMatrix22,
["maxMatrixVal=100"])

View File

@@ -69,7 +69,5 @@ def intersectionOfTwoLinesFunc(minM=-10,
intersection_of_two_lines = Generator(
"Intersection of Two Lines", 41,
"Find the point of intersection of the two lines: y = m1*x + b1 and y = m2*x + b2",
"(x, y)", intersectionOfTwoLinesFunc,
"Intersection of Two Lines", 41, intersectionOfTwoLinesFunc,
["minM=-10", "maxM=10", "minB=-10", "maxB=10", "minDenominator=1", "maxDenominator=6"])

View File

@@ -79,6 +79,5 @@ def matrixInversion(SquareMatrixDimension=3,
invert_matrix = Generator("Inverse of a Matrix", 74,
"Inverse of a matrix A is", "A^(-1)",
matrixInversion,
["SquareMatrixDimension=3", "MaxMatrixElement=99", "OnlyIntegerElementsInInvertedMatrix=False"])

View File

@@ -30,6 +30,5 @@ def linearEquationsFunc(n=2, varRange=20, coeffRange=20):
return problem, solution
linear_equations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12",
"x=-20 & y=12", linearEquationsFunc,
linear_equations = Generator("Linear Equations", 26, linearEquationsFunc,
["n=2", "varRange=20", "coeffRange=20"])

View File

@@ -17,5 +17,5 @@ def logFunc(maxBase=3, maxVal=8, style='raw'):
return problem, solution
log = Generator("Logarithm", 12, "log2(8)", "3", logFunc,
log = Generator("Logarithm", 12, logFunc,
["maxBase=3", "maxVal=8"])

View File

@@ -54,6 +54,5 @@ def matrixMultiplicationFuncHelper(inp):
matrix_multiplication = Generator("Multiplication of two matrices", 46,
"Multiply two matrices A and B", "C",
matrixMultiplicationFunc,
["maxVal=100", "max_dim=10"])

View File

@@ -13,7 +13,5 @@ def MidPointOfTwoPointFunc(maxValue=20):
midPoint_of_two_points = Generator("Midpoint of the two point", 20,
"((X1,Y1),(X2,Y2))=",
"((X1+X2)/2,(Y1+Y2)/2)",
MidPointOfTwoPointFunc,
["maxValue=20"])

View File

@@ -13,6 +13,5 @@ def multiplyComplexNumbersFunc(minRealImaginaryNum=-20,
multiply_complex_numbers = Generator("Multiplication of 2 complex numbers", 65,
"(x + j) (y + j) = ", "xy + xj + yj -1",
multiplyComplexNumbersFunc,
["minRealImaginaryNum=-20", "maxRealImaginaryNum=20"])

View File

@@ -26,7 +26,5 @@ def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100, style='raw'):
multiply_int_to_22_matrix = Generator("Integer Multiplication with 2x2 Matrix",
17, "k * [[a,b],[c,d]]=",
"[[k*a,k*b],[k*c,k*d]]",
multiplyIntToMatrix22,
17, multiplyIntToMatrix22,
["maxMatrixVal=10", "maxRes=100"])

View File

@@ -19,6 +19,5 @@ def quadraticEquation(maxVal=100):
quadratic_equation = Generator(
"Quadratic Equation", 50,
"Find the zeros {x1,x2} of the quadratic equation ax^2+bx+c=0", "x1,x2",
quadraticEquation,
["maxVal=100"])

View File

@@ -16,7 +16,5 @@ def simpleInterestFunc(maxPrinciple=10000, maxRate=10, maxTime=10):
simple_interest = Generator(
"Simple Interest", 45,
"Simple interest for a principle amount of a dollars, b% rate of interest and for a time period of c years is = ",
"d dollars", simpleInterestFunc,
"Simple Interest", 45, simpleInterestFunc,
["maxPrinciple=10000", "maxRate=10", "maxTime=10"])

View File

@@ -48,6 +48,5 @@ def systemOfEquationsFunc(range_x=10, range_y=10, coeff_mult_range=10):
system_of_equations = Generator("Solve a System of Equations in R^2", 23,
"2x + 5y = 13, -3x - 3y = -6", "x = -1, y = 3",
systemOfEquationsFunc,
["range_x=10", "range_y=10", "coeff_mult_range=10"])

View File

@@ -14,6 +14,6 @@ def vectorCrossFunc(minVal=-20, maxVal=20):
return problem, solution
vector_cross = Generator("Cross Product of 2 Vectors", 43, "a X b = ", "c",
vector_cross = Generator("Cross Product of 2 Vectors", 43,
vectorCrossFunc,
["minVal=-20", "maxVal=20"])

View File

@@ -11,6 +11,6 @@ def vectorDotFunc(minVal=-20, maxVal=20):
return problem, solution
vector_dot = Generator("Dot Product of 2 Vectors", 72, "a . b = ", "c",
vector_dot = Generator("Dot Product of 2 Vectors", 72,
vectorDotFunc,
["minVal=-20", "maxVal=20"])

View File

@@ -17,6 +17,5 @@ def absoluteDifferenceFunc(maxA=100, maxB=100, style='raw'):
absolute_difference = Generator(
"Absolute difference between two numbers", 71,
"Absolute difference betweeen two numbers a and b =", "|a-b|",
absoluteDifferenceFunc,
["maxA=100", "maxB=100"])

View File

@@ -1,7 +1,7 @@
from .__init__ import *
def addition_func(maxSum=99, maxAddend=50, style='raw'):
def main(maxSum=99, maxAddend=50, style='raw'):
if maxAddend > maxSum:
maxAddend = maxSum
a = random.randint(0, maxAddend)
@@ -19,5 +19,4 @@ def addition_func(maxSum=99, maxAddend=50, style='raw'):
return problem, solution
addition = Generator("Addition", 0, "a+b=", "c", addition_func,
["maxSum=99", "maxAddend=50"])
addition = Generator("Addition", 0, main, ["maxSum=99", "maxAddend=50"])

View File

@@ -31,6 +31,5 @@ def compareFractionsFunc(maxVal=10, style='raw'):
compare_fractions = Generator(
"Compare Fractions", 44,
"Which symbol represents the comparison between a/b and c/d?", ">/</=",
compareFractionsFunc,
["maxVal=10"])

View File

@@ -16,5 +16,5 @@ def complexDivisionFunc(maxRes=99, maxDivid=99, style='raw'):
return problem, solution
complex_division = Generator("Complex Division", 13, "a/b=", "c", complexDivisionFunc,
complex_division = Generator("Complex Division", 13, complexDivisionFunc,
["maxRes=99", "maxDivid=99"])

View File

@@ -16,6 +16,5 @@ def cubeRootFunc(minNo=1, maxNo=1000, style='raw'):
cube_root = Generator("Cube Root", 47,
"Cuberoot of a upto 2 decimal places is", "b",
cubeRootFunc,
["minNo=1", "maxNo=1000"])

View File

@@ -43,6 +43,6 @@ def divideFractionsFunc(maxVal=10, style='raw'):
return problem, solution
divide_fractions = Generator("Fraction Division", 16, "(a/b)/(c/d)=", "x/y",
divide_fractions = Generator("Fraction Division", 16,
divideFractionsFunc,
["maxVal=10"])

View File

@@ -18,5 +18,5 @@ def divisionToIntFunc(maxA=25, maxB=25, style='raw'):
return problem, solution
division = Generator("Division", 3, "a/b=", "c",
division = Generator("Division", 3,
divisionToIntFunc, ["maxA=25", "maxB=25"])

View File

@@ -14,6 +14,6 @@ def exponentiationFunc(maxBase=20, maxExpo=10, style='raw'):
return problem, solution
exponentiation = Generator("Exponentiation", 53, "a^b = ", "c",
exponentiation = Generator("Exponentiation", 53,
exponentiationFunc,
["maxBase=20", "maxExpo=10"])

View File

@@ -15,5 +15,5 @@ def factorialFunc(maxInput=6):
return problem, solution
factorial = Generator("Factorial", 31, "a! = ", "b",
factorial = Generator("Factorial", 31,
factorialFunc, ["maxInput=6"])

View File

@@ -40,6 +40,5 @@ def multiplyFractionsFunc(maxVal=10, style='raw'):
fraction_multiplication = Generator("Fraction Multiplication", 28,
"(a/b)*(c/d)=", "x/y",
multiplyFractionsFunc,
["maxVal=10"])

View File

@@ -18,6 +18,6 @@ def isprime(max_num=100):
return (problem, solution)
is_prime = Generator('isprime', 90, 'a any positive integer', 'True/False',
is_prime = Generator('isprime', 90,
isprime,
["max_num=100"])

View File

@@ -15,6 +15,6 @@ def multiplicationFunc(maxMulti=12, style='raw'):
return problem, solution
multiplication = Generator("Multiplication", 2, "a*b=", "c",
multiplication = Generator("Multiplication", 2,
multiplicationFunc,
["maxMulti=12"])

View File

@@ -11,6 +11,5 @@ def percentageFunc(maxValue=99, maxpercentage=99):
return problem, solution
percentage = Generator("Percentage of a number", 80, "What is a% of b?",
"percentage", percentageFunc,
percentage = Generator("Percentage of a number", 80, percentageFunc,
["maxValue=99", "maxpercentage=99"])

View File

@@ -17,6 +17,5 @@ def powerOfPowersFunc(maxBase=50, maxPower=10, style='raw'):
return problem, solution
power_of_powers = Generator("Power of Powers", 97, "6^4^2",
"6^8", powerOfPowersFunc,
power_of_powers = Generator("Power of Powers", 97, powerOfPowersFunc,
["maxBase=50", "maxPower=10"])

View File

@@ -14,4 +14,4 @@ def squareFunc(maxSquareNum=20, style='raw'):
return problem, solution
square = Generator("Square", 8, "a^2", "b", squareFunc, ["maxSquareNum=20"])
square = Generator("Square", 8, squareFunc, ["maxSquareNum=20"])

View File

@@ -14,5 +14,5 @@ def squareRootFunc(minNo=1, maxNo=12, style='raw'):
return problem, solution
square_root = Generator("Square Root", 6, "sqrt(a)=",
"b", squareRootFunc, ["minNo=1", "maxNo=12"])
square_root = Generator("Square Root", 6, squareRootFunc,
["minNo=1", "maxNo=12"])

View File

@@ -11,5 +11,5 @@ def subtractionFunc(maxMinuend=99, maxDiff=99):
return problem, solution
subtraction = Generator("Subtraction", 1, "a-b=", "c",
subtractionFunc, ["maxMinuend=99", "maxDiff=99"])
subtraction = Generator("Subtraction", 1, subtractionFunc,
["maxMinuend=99", "maxDiff=99"])

View File

@@ -24,6 +24,5 @@ def definiteIntegralFunc(max_coeff=100):
definite_integral = Generator(
"Definite Integral of Quadratic Equation", 89,
"The definite integral within limits 0 to 1 of quadratic equation ax^2+bx+c is = ",
"S", definiteIntegralFunc,
definiteIntegralFunc,
["max_coeff=100"])

View File

@@ -50,6 +50,5 @@ def differentiationFunc(diff_lvl=2):
differentiation = Generator("Differentiation", 88,
"differentiate w.r.t x : d(f(x))/dx", "g(x)",
differentiationFunc,
["diff_lvl=2"])

View File

@@ -19,6 +19,5 @@ def powerRuleDifferentiationFunc(maxCoef=10, maxExp=10, maxTerms=5):
power_rule_differentiation = Generator("Power Rule Differentiation", 7,
"nx^m=", "(n*m)x^(m-1)",
powerRuleDifferentiationFunc,
["maxCoef=10", "maxExp=10", "maxTerms=5"])

View File

@@ -21,6 +21,6 @@ def powerRuleIntegrationFunc(maxCoef=10, maxExp=10, maxTerms=5):
return problem, solution
power_rule_integration = Generator("Power Rule Integration", 48, "nx^m=",
"(n/m)x^(m+1)", powerRuleIntegrationFunc,
power_rule_integration = Generator("Power Rule Integration", 48,
powerRuleIntegrationFunc,
["maxCoef=10", "maxExp=10", "maxTerms=5"])

View File

@@ -20,6 +20,5 @@ def stationaryPointsFunc(maxExp=3, maxCoef=10):
return problem, solution
stationary_points = Generator("Stationary Points", 110, "f(x)=x^3-3x",
"(-1,2),(1,-2)", stationaryPointsFunc,
stationary_points = Generator("Stationary Points", 110, stationaryPointsFunc,
["maxExp=3", "maxCoef=10"])

View File

@@ -21,6 +21,5 @@ def BCDtoDecimalFunc(maxNumber=10000):
bcd_to_decimal = Generator("Binary Coded Decimal to Integer", 91,
"Integer of Binary Coded Decimal b is ", "n",
BCDtoDecimalFunc,
["maxNumber=10000"])

View File

@@ -29,6 +29,5 @@ def binary2sComplementFunc(maxDigits=10):
binary_2s_complement = Generator("Binary 2's Complement", 73,
"2's complement of 11010110 =", "101010",
binary2sComplementFunc,
["maxDigits=10"])

View File

@@ -15,6 +15,6 @@ def binaryComplement1sFunc(maxDigits=10):
return problem, solution
binary_complement_1s = Generator("Binary Complement 1s", 4, "1010=", "0101",
binary_complement_1s = Generator("Binary Complement 1s", 4,
binaryComplement1sFunc,
["maxDigits=10"])

View File

@@ -12,6 +12,6 @@ def binaryToDecimalFunc(max_dig=10):
return problem, solution
binary_to_decimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b",
binary_to_decimal = Generator("Binary to Decimal", 15,
binaryToDecimalFunc,
["max_dig=10"])

View File

@@ -11,6 +11,5 @@ def binaryToHexFunc(max_dig=10):
return problem, solution
binary_to_hex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=",
"b", binaryToHexFunc,
binary_to_hex = Generator("Binary to Hexidecimal", 64, binaryToHexFunc,
["max_dig=10"])

View File

@@ -17,6 +17,5 @@ def DecimalToBCDFunc(maxNumber=10000):
decimal_to_bcd = Generator("Decimal to Binary Coded Decimal", 103,
"Binary Coded Decimal of Decimal n is ", "b",
DecimalToBCDFunc,
["maxNumber=10000"])

View File

@@ -11,6 +11,6 @@ def DecimalToBinaryFunc(max_dec=99):
return problem, solution
decimal_to_binary = Generator("Decimal to Binary", 14, "Binary of a=", "b",
decimal_to_binary = Generator("Decimal to Binary", 14,
DecimalToBinaryFunc,
["max_dec=99"])

View File

@@ -10,6 +10,5 @@ def deciToHexaFunc(max_dec=1000):
return problem, solution
decimal_to_hexadeci = Generator("Decimal to Hexadecimal", 79, "Binary of a=",
"b", deciToHexaFunc,
decimal_to_hexadeci = Generator("Decimal to Hexadecimal", 79, deciToHexaFunc,
["max_dec=1000"])

View File

@@ -9,6 +9,5 @@ def decimalToOctalFunc(maxDecimal=4096):
decimal_to_octal = Generator("Converts decimal to octal", 84,
"What's the octal representation of 98?", "0o142",
decimalToOctalFunc,
["maxDecimal=4096"])

View File

@@ -22,6 +22,5 @@ def fibonacciSeriesFunc(minNo=1):
fibonacci_series = Generator(
"Fibonacci Series", 56, "fibonacci series of first a numbers",
"prints the fibonacci series starting from 0 to a", fibonacciSeriesFunc,
"Fibonacci Series", 56, fibonacciSeriesFunc,
["minNo=1"])

View File

@@ -11,5 +11,5 @@ def moduloFunc(maxRes=99, maxModulo=99):
return problem, solution
modulo_division = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc,
modulo_division = Generator("Modulo Division", 5, moduloFunc,
["maxRes=99", "maxModulo=99"])

View File

@@ -13,6 +13,5 @@ def nthFibonacciNumberFunc(maxN=100):
nth_fibonacci_number = Generator("nth Fibonacci number", 62,
"What is the nth Fibonacci number", "Fn",
nthFibonacciNumberFunc,
["maxN=100"])

View File

@@ -26,7 +26,5 @@ def angleBtwVectorsFunc(maxEltAmt=20):
angle_btw_vectors = Generator(
"Angle between 2 vectors", 70,
"Angle Between 2 vectors V1=[v11, v12, ..., v1n] and V2=[v21, v22, ....., v2n]",
"V1.V2 / (euclidNorm(V1)*euclidNorm(V2))", angleBtwVectorsFunc,
"Angle between 2 vectors", 70, angleBtwVectorsFunc,
["maxEltAmt=20"])

View File

@@ -12,6 +12,5 @@ def regularPolygonAngleFunc(minVal=3, maxVal=20):
angle_regular_polygon = Generator(
"Angle of a Regular Polygon", 29,
"Find the angle of a regular polygon with 6 sides", "120",
regularPolygonAngleFunc,
["minVal=3", "maxVal=20"])

View File

@@ -13,6 +13,5 @@ def arclengthFunc(maxRadius=49, maxAngle=359):
return problem, solution
arc_length = Generator("Arc length of Angle", 108,
" Given the radius, r and angle, ang. Calculate the arc length of the given angle", "(ang/360) * 2 * pi * r", arclengthFunc,
arc_length = Generator("Arc length of Angle", 108, arclengthFunc,
["maxRadius=49", "maxAngle=359"])

View File

@@ -10,5 +10,5 @@ def areaCircle(maxRadius=100):
return problem, solution
area_of_circle = Generator("Area of Circle", 112, "pi*r*r=", "area", areaCircle,
area_of_circle = Generator("Area of Circle", 112, areaCircle,
["maxRadius=100"])

View File

@@ -16,6 +16,5 @@ def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20):
area_of_triangle = Generator("Area of Triangle", 18,
"Area of Triangle with side lengths a, b, c = ",
"area", areaOfTriangleFunc,
areaOfTriangleFunc,
["maxA=20", "maxB=20", "maxC=20"])

View File

@@ -27,6 +27,5 @@ def basicTrigonometryFunc(angles=[0, 30, 45, 60, 90],
return problem, solution
basic_trigonometry = Generator("Trigonometric Values", 57, "What is sin(X)?",
"ans", basicTrigonometryFunc,
basic_trigonometry = Generator("Trigonometric Values", 57, basicTrigonometryFunc,
["angles=[0, 30, 45, 60, 90]", "functions=['sin', 'cos', 'tan']"])

View File

@@ -10,5 +10,5 @@ def circumferenceCircle(maxRadius=100):
return problem, solution
circumference = Generator("Circumference", 104, "2*pi*r=", "circumference", circumferenceCircle,
circumference = Generator("Circumference", 104, circumferenceCircle,
["maxRadius=100"])

View File

@@ -13,6 +13,5 @@ def curvedSurfaceAreaCylinderFunc(maxRadius=49, maxHeight=99):
curved_surface_area_cylinder = Generator(
"Curved surface area of a cylinder", 95,
"What is CSA of a cylinder of radius, r and height, h?", "csa of cylinder",
curvedSurfaceAreaCylinderFunc,
["maxRadius=49", "maxHeight=99"])

View File

@@ -13,6 +13,5 @@ def degreeToRadFunc(max_deg=360):
return problem, solution
degree_to_rad = Generator("Degrees to Radians", 86, "Angle a in radians is = ",
"b", degreeToRadFunc,
degree_to_rad = Generator("Degrees to Radians", 86, degreeToRadFunc,
["max_deg=360"])

View File

@@ -16,6 +16,5 @@ def fourthAngleOfQuadriFunc(maxAngle=180):
fourth_angle_of_quadrilateral = Generator(
"Fourth Angle of Quadrilateral", 49,
"Fourth angle of Quadrilateral with angles a,b,c =", "angle4",
fourthAngleOfQuadriFunc,
["maxAngle=180"])

View File

@@ -16,6 +16,5 @@ def perimeterOfPolygons(maxSides=12, maxLength=120):
perimeter_of_polygons = Generator(
"Perimeter of Polygons", 96,
"The perimeter of a x sided polygon with lengths of y cm is: ", "z",
perimeterOfPolygons,
["maxSides=12", "maxLength=120"])

View File

@@ -12,7 +12,5 @@ def pythagoreanTheoremFunc(maxLength=20):
pythagorean_theorem = Generator(
"Pythagorean Theorem", 25,
"The hypotenuse of a right triangle given the other two lengths a and b = ",
"hypotenuse", pythagoreanTheoremFunc,
"Pythagorean Theorem", 25, pythagoreanTheoremFunc,
["maxLength=20"])

View File

@@ -14,6 +14,5 @@ def radianToDegFunc(max_rad=3):
return problem, solution
radian_to_deg = Generator("Radians to Degrees", 87, "Angle a in degrees is = ",
"b", radianToDegFunc,
radian_to_deg = Generator("Radians to Degrees", 87, radianToDegFunc,
["max_rad=3"])

View File

@@ -11,7 +11,5 @@ def sectorAreaFunc(maxRadius=49, maxAngle=359):
return problem, solution
sector_area = Generator("Area of a Sector", 75,
"Area of a sector with radius, r and angle, a ",
"Area", sectorAreaFunc,
sector_area = Generator("Area of a Sector", 75, sectorAreaFunc,
["maxRadius=49", "maxAngle=359"])

View File

@@ -11,6 +11,5 @@ def sumOfAnglesOfPolygonFunc(maxSides=12):
sum_of_polygon_angles = Generator("Sum of Angles of Polygon", 58,
"Sum of angles of polygon with n sides = ",
"sum", sumOfAnglesOfPolygonFunc,
sumOfAnglesOfPolygonFunc,
["maxSides=12"])

View File

@@ -15,6 +15,5 @@ def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'):
surface_area_cone = Generator(
"Surface Area of cone", 38,
"Surface area of cone with height = a units and radius = b units is",
"c units^2", surfaceAreaCone,
surfaceAreaCone,
["maxRadius=20", "maxHeight=50", "unit='m'"])

View File

@@ -10,6 +10,5 @@ def surfaceAreaCube(maxSide=20, unit='m'):
surface_area_cube = Generator("Surface Area of Cube", 32,
"Surface area of cube with side a units is",
"b units^2", surfaceAreaCube,
surfaceAreaCube,
["maxSide=20", "unit='m'"])

View File

@@ -14,6 +14,5 @@ def surfaceAreaCuboid(maxSide=20, unit='m'):
surface_area_cuboid = Generator(
"Surface Area of Cuboid", 33,
"Surface area of cuboid with sides = a units, b units, c units is",
"d units^2", surfaceAreaCuboid,
surfaceAreaCuboid,
["maxSide=20", "unit='m'"])

View File

@@ -13,6 +13,5 @@ def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'):
surface_area_cylinder = Generator(
"Surface Area of Cylinder", 34,
"Surface area of cylinder with height = a units and radius = b units is",
"c units^2", surfaceAreaCylinder,
surfaceAreaCylinder,
["maxRadius=20", "maxHeight=50", "unit='m'"])

View File

@@ -12,6 +12,5 @@ def surfaceAreaSphere(maxSide=20, unit='m'):
surface_area_sphere = Generator(
"Surface Area of Sphere", 60,
"Surface area of sphere with radius = a units is", "d units^2",
surfaceAreaSphere,
["maxSide=20", "unit='m'"])

View File

@@ -12,6 +12,5 @@ def thirdAngleOfTriangleFunc(maxAngle=89):
third_angle_of_triangle = Generator("Third Angle of Triangle", 22,
"Third Angle of the triangle = ", "angle3",
thirdAngleOfTriangleFunc,
["maxAngle=89"])

View File

@@ -21,6 +21,5 @@ def isTriangleValidFunc(maxSideLength=50):
valid_triangle = Generator("Triangle exists check", 19,
"Does triangle with sides a, b and c exist?",
"Yes/No", isTriangleValidFunc,
isTriangleValidFunc,
["maxSideLength=50"])

View File

@@ -13,6 +13,5 @@ def volumeCone(maxRadius=20, maxHeight=50, unit='m'):
volume_cone = Generator(
"Volume of cone", 39,
"Volume of cone with height = a units and radius = b units is",
"c units^3", volumeCone,
volumeCone,
["maxRadius=20", "maxHeight=50", "unit='m'"])

View File

@@ -11,6 +11,5 @@ def volumeCube(maxSide=20, unit='m'):
volume_cube = Generator("Volum of Cube", 35,
"Volume of cube with side a units is", "b units^3",
volumeCube,
["maxSide=20", "unit='m'"])

View File

@@ -14,6 +14,5 @@ def volumeCuboid(maxSide=20, unit='m'):
volume_cuboid = Generator(
"Volume of Cuboid", 36,
"Volume of cuboid with sides = a units, b units, c units is", "d units^3",
volumeCuboid,
["maxSide=20", "unit='m'"])

View File

@@ -13,6 +13,5 @@ def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'):
volume_cylinder = Generator(
"Volume of cylinder", 37,
"Volume of cylinder with height = a units and radius = b units is",
"c units^3", volumeCylinder,
volumeCylinder,
["maxRadius=20", "maxHeight=50", "unit='m'"])

View File

@@ -11,6 +11,5 @@ def volumeSphereFunc(maxRadius=100):
volume_sphere = Generator("Volume of Sphere", 61,
"Volume of sphere with radius r m = ",
"(4*pi/3)*r*r*r", volumeSphereFunc,
volumeSphereFunc,
["maxRadius=100"])

View File

@@ -17,6 +17,5 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100):
arithmetic_progression_sum = Generator(
"AP Sum Calculation", 83,
"Find the sum of first n terms of the AP series: a1, a2, a3 ...", "Sum",
arithmeticProgressionSumFunc,
["maxd=100", "maxa=100", "maxn=100"])

View File

@@ -16,6 +16,5 @@ def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100):
arithmetic_progression_term = Generator(
"AP Term Calculation", 82,
"Find the term number n of the AP series: a1, a2, a3 ...", "a-n",
arithmeticProgressionTermFunc,
["maxd=100", "maxa=100", "maxn=100"])

View File

@@ -54,6 +54,5 @@ def baseConversionFunc(maxNum=60000, maxBase=16):
base_conversion = Generator("Base Conversion", 94,
"Convert 152346 from base 8 to base 10.", "54502",
baseConversionFunc,
["maxNum=60000", "maxBase=16"])

View File

@@ -39,4 +39,4 @@ def binomialDistFunc():
binomial_distribution = Generator("Binomial distribution", 109,
"P(X<x)=", "c", binomialDistFunc, [""])
binomialDistFunc, [""])

View File

@@ -11,6 +11,5 @@ def celsiustofahrenheitFunc(maxTemp=100):
celsius_to_fahrenheit = Generator("Celsius To Fahrenheit", 81,
"(C +(9/5))+32=", "F",
celsiustofahrenheitFunc,
["maxTemp=100"])

View File

@@ -25,6 +25,5 @@ def commonFactorsFunc(maxVal=100):
common_factors = Generator("Common Factors", 40,
"Common Factors of {a} and {b} = ", "[c, d, ...]",
commonFactorsFunc,
["maxVal=100"])

View File

@@ -16,6 +16,5 @@ def complexToPolarFunc(minRealImaginaryNum=-20, maxRealImaginaryNum=20):
return problem, solution
complex_to_polar = Generator("Complex To Polar Form", 92, "rexp(itheta) = ",
"plr", complexToPolarFunc,
complex_to_polar = Generator("Complex To Polar Form", 92, complexToPolarFunc,
["minRealImaginaryNum=-20, maxRealImaginaryNum=20"])

View File

@@ -36,6 +36,5 @@ def decimalToRomanNumeralsFunc(maxDecimal=4000):
decimal_to_roman_numerals = Generator("Converts decimal to Roman Numerals", 85,
"Convert 20 into Roman Numerals", "XX",
decimalToRomanNumeralsFunc,
["maxDecimal=4000"])

View File

@@ -13,7 +13,5 @@ def euclidianNormFunc(maxEltAmt=20):
eucldian_norm = Generator(
"Euclidian norm or L2 norm of a vector", 69,
"Euclidian Norm of a vector V:[v1, v2, ......., vn]",
"sqrt(v1^2 + v2^2 ........ +vn^2)", euclidianNormFunc,
"Euclidian norm or L2 norm of a vector", 69, euclidianNormFunc,
["maxEltAmt=20"])

View File

@@ -12,6 +12,5 @@ def gcdFunc(maxVal=20):
return problem, solution
gcd = Generator("GCD (Greatest Common Denominator)", 10, "GCD of a and b = ",
"c", gcdFunc,
gcd = Generator("GCD (Greatest Common Denominator)", 10, gcdFunc,
["maxVal=20"])

View File

@@ -28,7 +28,5 @@ def geometricMeanFunc(maxValue=100, maxNum=4):
geometric_mean = Generator(
"Geometric Mean of N Numbers", 67,
"Geometric mean of n numbers A1 , A2 , ... , An = ",
"(A1*A2*...An)^(1/n) = ans", geometricMeanFunc,
"Geometric Mean of N Numbers", 67, geometricMeanFunc,
["maxValue=100", "maxNum=4"])

View File

@@ -24,7 +24,5 @@ def geomProgrFunc(number_values=6,
geometric_progression = Generator(
"Geometric Progression", 66,
"Initial value,Common Ratio,nth Term,Sum till nth term =",
"a,r,ar^n-1,sum(ar^n-1", geomProgrFunc,
"Geometric Progression", 66, geomProgrFunc,
["number_values=6", "min_value=2", "max_value=12", "n_term=7", "sum_term=5"])

View File

@@ -29,7 +29,5 @@ def harmonicMeanFunc(maxValue=100, maxNum=4):
harmonic_mean = Generator("Harmonic Mean of N Numbers", 68,
"Harmonic mean of n numbers A1 , A2 , ... , An = ",
" n/((1/A1) + (1/A2) + ... + (1/An)) = ans",
harmonicMeanFunc,
["maxValue=100", "maxNum=4"])

View File

@@ -12,6 +12,5 @@ def hcfFunc(maxVal=20):
return problem, solution
hcf = Generator("HCF (Highest Common Factor)", 51, "HCF of a and b = ", "c",
hcfFunc,
hcf = Generator("HCF (Highest Common Factor)", 51, hcfFunc,
["maxVal=20"])

View File

@@ -20,6 +20,5 @@ def IsLeapYear(minNumber=1900, maxNumber=2099):
is_leap_year = Generator("Leap Year or Not", 101,
"Year y ", "is/not a leap year",
IsLeapYear,
["minNumber=1900", "maxNumber=2099"])

View File

@@ -17,6 +17,6 @@ def lcmFunc(maxVal=20):
return problem, solution
lcm = Generator("LCM (Least Common Multiple)", 9, "LCM of a and b = ", "c",
lcm = Generator("LCM (Least Common Multiple)", 9,
lcmFunc,
["maxVal=20"])

View File

@@ -11,5 +11,5 @@ def minutesToHoursFunc(maxMinutes=999):
minutes_to_hours = Generator("Minute to Hour conversion", 102,
"Convert minutes to Hours & Minutes", "hours:minutes", minutesToHoursFunc,
minutesToHoursFunc,
["maxMinutes=999"])

Some files were not shown because too many files have changed in this diff Show More