Merge pull request #292 from Todarith/pep8

Pep8 module naming fixes
This commit is contained in:
Luke Weiler
2020-10-20 11:43:15 -04:00
committed by GitHub
91 changed files with 245 additions and 325 deletions

View File

@@ -2,91 +2,93 @@ import random
import math import math
import fractions import fractions
from ..__init__ import *
from .addition import * from .addition import *
from .subtractionFunc import * from .subtraction import *
from .multiplicationFunc import * from .multiplication import *
from .divisionFunc import * from .division import *
from .binaryComplement1sFunc import * from .binary_complement_1s import *
from .moduloFunc import * from .modulo_division import *
from .squareRootFunc import * from .square_root import *
from .powerRuleDifferentiationFunc import * from .power_rule_differentiation import *
from .squareFunc import * from .square import *
from .lcmFunc import * from .lcm import *
from .gcdFunc import * from .gcd import *
from .basicAlgebraFunc import * from .basic_algebra import *
from .logFunc import * from .log import *
from .divisionToIntFunc import * from .int_division import *
from .DecimalToBinaryFunc import * from .decimal_to_binary import *
from .BinaryToDecimalFunc import * from .binary_to_decimal import *
from .divideFractionsFunc import * from .divide_fractions import *
from .multiplyIntToMatrix22 import * from .multiply_int_to_22_matrix import *
from .areaOfTriangleFunc import * from .area_of_triangle import *
from .isTriangleValidFunc import * from .valid_triangle import *
from .MidPointOfTwoPointFunc import * from .midpoint_of_two_points import *
from .factoringFunc import * from .factoring import *
from .thirdAngleOfTriangleFunc import * from .third_angle_of_triangle import *
from .systemOfEquationsFunc import * from .system_of_equations import *
from .distanceTwoPointsFunc import * from .distance_two_points import *
from .pythagoreanTheoremFunc import * from .pythagorean_theorem import *
from .linearEquationsFunc import * from .linear_equations import *
from .primeFactorsFunc import * from .prime_factors import *
from .multiplyFractionsFunc import * from .fraction_multiplication import *
from .regularPolygonAngleFunc import * from .angle_regular_polygon import *
from .combinationsFunc import * from .combinations import *
from .factorialFunc import * from .factorial import *
from .surfaceAreaCube import * from .surface_area_cube import *
from .surfaceAreaCuboid import * from .surface_area_cuboid import *
from .surfaceAreaCylinder import * from .surface_area_cylinder import *
from .volumeCube import * from .volume_cube import *
from .volumeCuboid import * from .volume_cuboid import *
from .volumeCylinder import * from .volume_cylinder import *
from .surfaceAreaCone import * from .surface_area_cone import *
from .volumeCone import * from .volume_cone import *
from .commonFactorsFunc import * from .common_factors import *
from .intersectionOfTwoLinesFunc import * from .intersection_of_two_lines import *
from .permutationFunc import * from .permutation import *
from .vectorCrossFunc import * from .vector_cross import *
from .compareFractionsFunc import * from .compare_fractions import *
from .simpleInterestFunc import * from .simple_interest import *
from .matrixMultiplicationFunc import * from .matrix_multiplication import *
from .cubeRootFunc import * from .cube_root import *
from .powerRuleIntegrationFunc import * from .power_rule_integration import *
from .fourthAngleOfQuadriFunc import * from .fourth_angle_of_quadrilateral import *
from .quadraticEquation import * from .quadratic_equation import *
from .hcfFunc import * from .hcf import *
from .DiceSumProbFunc import * from .dice_sum_probability import *
from .exponentiationFunc import * from .exponentiation import *
from .confidenceIntervalFunc import * from .confidence_interval import *
from .surdsComparisonFunc import * from .surds_comparison import *
from .fibonacciSeriesFunc import * from .fibonacci_series import *
from .basicTrigonometryFunc import * from .basic_trigonometry import *
from .sumOfAnglesOfPolygonFunc import * from .sum_of_polygon_angles import *
from .dataSummaryFunc import * from .data_summary import *
from .surfaceAreaSphere import * from .surface_area_sphere import *
from .volumeSphereFunc import * from .volume_sphere import *
from .nthFibonacciNumberFunc import * from .nth_fibonacci_number import *
from .profitLossPercentFunc import * from .profit_loss_percent import *
from .binaryToHexFunc import * from .binary_to_hex import *
from .multiplyComplexNumbersFunc import * from .multiply_complex_numbers import *
from .geomProgrFunc import * from .geometric_progression import *
from .geometricMeanFunc import * from .geometric_mean import *
from .harmonicMeanFunc import * from .harmonic_mean import *
from .euclidianNormFunc import * from .euclidian_norm import *
from .angleBtwVectorsFunc import * from .angle_btw_vectors import *
from .absoluteDifferenceFunc import * from .absolute_difference import *
from .vectorDotFunc import * from .vector_dot import *
from .binary2sComplement import * from .binary_2s_complement import *
from .matrixInversion import * from .invert_matrix import *
from .sectorAreaFunc import * from .sector_area import *
from .meanMedianFunc import * from .mean_median import *
from .determinantToMatrix22 import * from .int_matrix_22_determinant import *
from .compoundInterestFunc import * from .compound_interest import *
from .deciToHexaFunc import * from .decimal_to_hexadeci import *
from .percentageFunc import * from .percentage import *
from .celsiustofahrenheit import * from .celsius_to_fahrenheit import *
from .arithmeticProgressionTermFunc import * from .arithmetic_progression_term import *
from .arithmeticProgressionSumFunc import * from .arithmetic_progression_sum import *
from .decimalToOctalFunc import * from .decimal_to_octal import *
from .decimalToRomanNumeralsFunc import * from .decimal_to_roman_numerals import *
from .degreeToRadFunc import * from .degree_to_rad import *
from .radianToDegFunc import * from .radian_to_deg import *

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def absoluteDifferenceFunc(maxA=100, maxB=100): def absoluteDifferenceFunc(maxA=100, maxB=100):
@@ -13,7 +12,7 @@ def absoluteDifferenceFunc(maxA=100, maxB=100):
return problem, solution return problem, solution
absoluteDifference = Generator( absolute_difference = Generator(
"Absolute difference between two numbers", 71, "Absolute difference between two numbers", 71,
"Absolute difference betweeen two numbers a and b =", "|a-b|", "Absolute difference betweeen two numbers a and b =", "|a-b|",
absoluteDifferenceFunc) absoluteDifferenceFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def additionFunc(maxSum=99, maxAddend=50): def additionFunc(maxSum=99, maxAddend=50):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
import math import math
@@ -23,7 +22,7 @@ def angleBtwVectorsFunc(maxEltAmt=20):
return problem, solution return problem, solution
angleBtwVectors = Generator( angle_btw_vectors = Generator(
"Angle between 2 vectors", 70, "Angle between 2 vectors", 70,
"Angle Between 2 vectors V1=[v11, v12, ..., v1n] and V2=[v21, v22, ....., v2n]", "Angle Between 2 vectors V1=[v11, v12, ..., v1n] and V2=[v21, v22, ....., v2n]",
"V1.V2 / (euclidNorm(V1)*euclidNorm(V2))", angleBtwVectorsFunc) "V1.V2 / (euclidNorm(V1)*euclidNorm(V2))", angleBtwVectorsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def regularPolygonAngleFunc(minVal=3, maxVal=20): def regularPolygonAngleFunc(minVal=3, maxVal=20):
@@ -11,7 +10,7 @@ def regularPolygonAngleFunc(minVal=3, maxVal=20):
return problem, solution return problem, solution
angleRegularPolygon = Generator( angle_regular_polygon = Generator(
"Angle of a Regular Polygon", 29, "Angle of a Regular Polygon", 29,
"Find the angle of a regular polygon with 6 sides", "120", "Find the angle of a regular polygon with 6 sides", "120",
regularPolygonAngleFunc) regularPolygonAngleFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20): def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20):
@@ -16,6 +15,6 @@ def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20):
return problem, solution return problem, solution
areaOfTriangle = Generator("Area of Triangle", 18, area_of_triangle = Generator("Area of Triangle", 18,
"Area of Triangle with side lengths a, b, c = ", "Area of Triangle with side lengths a, b, c = ",
"area", areaOfTriangleFunc) "area", areaOfTriangleFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100): def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100):
@@ -14,6 +13,6 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100):
return problem, solution return problem, solution
arithmeticProgressionSum = Generator("AP Sum Calculation", 83, arithmetic_progression_sum = Generator("AP Sum Calculation", 83,
"Find the sum of first n terms of the AP series: a1, a2, a3 ...", "Find the sum of first n terms of the AP series: a1, a2, a3 ...",
"Sum", arithmeticProgressionSumFunc) "Sum", arithmeticProgressionSumFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100): def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100):
@@ -14,6 +13,6 @@ def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100):
return problem, solution return problem, solution
arithmeticProgressionTerm = Generator("AP Term Calculation", 82, arithmetic_progression_term = Generator("AP Term Calculation", 82,
"Find the term number n of the AP series: a1, a2, a3 ...", "Find the term number n of the AP series: a1, a2, a3 ...",
"a-n", arithmeticProgressionTermFunc) "a-n", arithmeticProgressionTermFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def basicAlgebraFunc(maxVariable=10): def basicAlgebraFunc(maxVariable=10):
@@ -26,5 +25,5 @@ def basicAlgebraFunc(maxVariable=10):
return problem, solution return problem, solution
basicAlgebra = Generator("Basic Algebra", 11, "ax + b = c", "d", basic_algebra = Generator("Basic Algebra", 11, "ax + b = c", "d",
basicAlgebraFunc) basicAlgebraFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
# Handles degrees in quadrant one # Handles degrees in quadrant one
@@ -26,5 +25,5 @@ def basicTrigonometryFunc(angles=[0, 30, 45, 60, 90],
return problem, solution return problem, solution
basicTrigonometry = Generator("Trigonometric Values", 57, "What is sin(X)?", basic_trigonometry = Generator("Trigonometric Values", 57, "What is sin(X)?",
"ans", basicTrigonometryFunc) "ans", basicTrigonometryFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def binary2sComplementFunc(maxDigits=10): def binary2sComplementFunc(maxDigits=10):
@@ -29,6 +28,6 @@ def binary2sComplementFunc(maxDigits=10):
return problem, solution return problem, solution
binary2sComplement = Generator("Binary 2's Complement", 73, binary_2s_complement = Generator("Binary 2's Complement", 73,
"2's complement of 11010110 =", "101010", "2's complement of 11010110 =", "101010",
binary2sComplementFunc) binary2sComplementFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def binaryComplement1sFunc(maxDigits=10): def binaryComplement1sFunc(maxDigits=10):
@@ -16,5 +15,5 @@ def binaryComplement1sFunc(maxDigits=10):
return problem, solution return problem, solution
binaryComplement1s = Generator("Binary Complement 1s", 4, "1010=", "0101", binary_complement_1s = Generator("Binary Complement 1s", 4, "1010=", "0101",
binaryComplement1sFunc) binaryComplement1sFunc)

View File

@@ -1,8 +1,7 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def BinaryToDecimalFunc(max_dig=10): def binaryToDecimalFunc(max_dig=10):
problem = '' problem = ''
for i in range(random.randint(1, max_dig)): for i in range(random.randint(1, max_dig)):
@@ -13,5 +12,5 @@ def BinaryToDecimalFunc(max_dig=10):
return problem, solution return problem, solution
binaryToDecimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b", binary_to_decimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b",
BinaryToDecimalFunc) binaryToDecimalFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def binaryToHexFunc(max_dig=10): def binaryToHexFunc(max_dig=10):
@@ -12,5 +11,5 @@ def binaryToHexFunc(max_dig=10):
return problem, solution return problem, solution
binaryToHex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=", "b", binary_to_hex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=", "b",
binaryToHexFunc) binaryToHexFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def celsiustofahrenheitFunc(maxTemp=100): def celsiustofahrenheitFunc(maxTemp=100):
@@ -10,5 +9,5 @@ def celsiustofahrenheitFunc(maxTemp=100):
return problem, solution return problem, solution
celsiustofahrenheit = Generator("Celsius To Fahrenheit", 81, celsius_to_fahrenheit = Generator("Celsius To Fahrenheit", 81,
"(C +(9/5))+32=", "F", celsiustofahrenheitFunc) "(C +(9/5))+32=", "F", celsiustofahrenheitFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def combinationsFunc(maxlength=20): def combinationsFunc(maxlength=20):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def commonFactorsFunc(maxVal=100): def commonFactorsFunc(maxVal=100):
@@ -25,6 +24,6 @@ def commonFactorsFunc(maxVal=100):
return problem, solution return problem, solution
commonFactors = Generator("Common Factors", 40, common_factors = Generator("Common Factors", 40,
"Common Factors of {a} and {b} = ", "[c, d, ...]", "Common Factors of {a} and {b} = ", "[c, d, ...]",
commonFactorsFunc) commonFactorsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def compareFractionsFunc(maxVal=10): def compareFractionsFunc(maxVal=10):
@@ -27,7 +26,7 @@ def compareFractionsFunc(maxVal=10):
return problem, solution return problem, solution
compareFractions = Generator( compare_fractions = Generator(
"Compare Fractions", 44, "Compare Fractions", 44,
"Which symbol represents the comparison between a/b and c/d?", ">/</=", "Which symbol represents the comparison between a/b and c/d?", ">/</=",
compareFractionsFunc) compareFractionsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def compoundInterestFunc(maxPrinciple=10000, def compoundInterestFunc(maxPrinciple=10000,
@@ -19,7 +18,7 @@ def compoundInterestFunc(maxPrinciple=10000,
return problem, solution return problem, solution
compoundInterest = Generator( compound_interest = Generator(
"Compound Interest", 78, "Compound Interest", 78,
"Compound interest for a principle amount of p dollars, r% rate of interest and for a time period of t years with n times compounded annually is = ", "Compound interest for a principle amount of p dollars, r% rate of interest and for a time period of t years with n times compounded annually is = ",
"A dollars", compoundInterestFunc) "A dollars", compoundInterestFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def confidenceIntervalFunc(): def confidenceIntervalFunc():
@@ -32,6 +31,6 @@ def confidenceIntervalFunc():
return problem, solution return problem, solution
confidenceInterval = Generator("Confidence interval For sample S", 54, confidence_interval = Generator("Confidence interval For sample S", 54,
"With X% confidence", "is (A,B)", "With X% confidence", "is (A,B)",
confidenceIntervalFunc) confidenceIntervalFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def cubeRootFunc(minNo=1, maxNo=1000): def cubeRootFunc(minNo=1, maxNo=1000):
@@ -11,5 +10,5 @@ def cubeRootFunc(minNo=1, maxNo=1000):
return problem, solution return problem, solution
CubeRoot = Generator("Cube Root", 47, "Cuberoot of a upto 2 decimal places is", cube_root = Generator("Cube Root", 47, "Cuberoot of a upto 2 decimal places is",
"b", cubeRootFunc) "b", cubeRootFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def dataSummaryFunc(number_values=15, minval=5, maxval=50): def dataSummaryFunc(number_values=15, minval=5, maxval=50):
@@ -26,5 +25,5 @@ def dataSummaryFunc(number_values=15, minval=5, maxval=50):
return problem, solution return problem, solution
dataSummary = Generator("Mean,Standard Deviation,Variance", 59, "a,b,c", data_summary = Generator("Mean,Standard Deviation,Variance", 59, "a,b,c",
"Mean:a+b+c/3,Std,Var", dataSummaryFunc) "Mean:a+b+c/3,Std,Var", dataSummaryFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def DecimalToBinaryFunc(max_dec=99): def DecimalToBinaryFunc(max_dec=99):
@@ -12,5 +11,5 @@ def DecimalToBinaryFunc(max_dec=99):
return problem, solution return problem, solution
decimalToBinary = Generator("Decimal to Binary", 14, "Binary of a=", "b", decimal_to_binary = Generator("Decimal to Binary", 14, "Binary of a=", "b",
DecimalToBinaryFunc) DecimalToBinaryFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def deciToHexaFunc(max_dec=1000): def deciToHexaFunc(max_dec=1000):
@@ -11,5 +10,5 @@ def deciToHexaFunc(max_dec=1000):
return problem, solution return problem, solution
decimalToHexadeci = Generator("Decimal to Hexadecimal", 79, "Binary of a=", decimal_to_hexadeci = Generator("Decimal to Hexadecimal", 79, "Binary of a=",
"b", deciToHexaFunc) "b", deciToHexaFunc)

View File

@@ -8,5 +8,5 @@ def decimalToOctalFunc(maxDecimal=4096):
return problem, solution return problem, solution
decimalToOctal = Generator("Converts decimal to octal", 84, decimal_to_octal = Generator("Converts decimal to octal", 84,
"What's the octal representation of 98?", "0o142", decimalToOctalFunc) "What's the octal representation of 98?", "0o142", decimalToOctalFunc)

View File

@@ -25,5 +25,5 @@ def decimalToRomanNumeralsFunc(maxDecimal=4000):
return problem, solution return problem, solution
decimalToRomanNumerals = Generator("Converts decimal to Roman Numerals", decimal_to_roman_numerals = Generator("Converts decimal to Roman Numerals",
85, "Convert 20 into Roman Numerals", "XX", decimalToRomanNumeralsFunc) 85, "Convert 20 into Roman Numerals", "XX", decimalToRomanNumeralsFunc)

View File

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

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def DiceSumProbFunc(maxDice=3): def DiceSumProbFunc(maxDice=3):
@@ -27,7 +26,7 @@ def DiceSumProbFunc(maxDice=3):
return problem, solution return problem, solution
diceSumProbability = Generator( dice_sum_probability = Generator(
"Probability of a certain sum appearing on faces of dice", 52, "Probability of a certain sum appearing on faces of dice", 52,
"If n dices are rolled then probabilty of getting sum of x is =", "z", "If n dices are rolled then probabilty of getting sum of x is =", "z",
DiceSumProbFunc) DiceSumProbFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def distanceTwoPointsFunc(maxValXY=20, minValXY=-20): def distanceTwoPointsFunc(maxValXY=20, minValXY=-20):
@@ -15,6 +14,6 @@ def distanceTwoPointsFunc(maxValXY=20, minValXY=-20):
return problem, solution return problem, solution
distance2Point = Generator("Distance between 2 points", 24, distance_two_points = Generator("Distance between 2 points", 24,
"Find the distance between (x1,y1) and (x2,y2)", "Find the distance between (x1,y1) and (x2,y2)",
"sqrt(distanceSquared)", distanceTwoPointsFunc) "sqrt(distanceSquared)", distanceTwoPointsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def divideFractionsFunc(maxVal=10): def divideFractionsFunc(maxVal=10):
@@ -33,5 +32,5 @@ def divideFractionsFunc(maxVal=10):
return problem, solution return problem, solution
fractionDivision = Generator("Fraction Division", 16, "(a/b)/(c/d)=", "x/y", divide_fractions = Generator("Fraction Division", 16, "(a/b)/(c/d)=", "x/y",
divideFractionsFunc) divideFractionsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def divisionFunc(maxRes=99, maxDivid=99): def divisionFunc(maxRes=99, maxDivid=99):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def euclidianNormFunc(maxEltAmt=20): def euclidianNormFunc(maxEltAmt=20):
@@ -9,6 +8,6 @@ def euclidianNormFunc(maxEltAmt=20):
return problem, solution return problem, solution
eucldianNorm = Generator("Euclidian norm or L2 norm of a vector", 69, eucldian_norm = Generator("Euclidian norm or L2 norm of a vector", 69,
"Euclidian Norm of a vector V:[v1, v2, ......., vn]", "Euclidian Norm of a vector V:[v1, v2, ......., vn]",
"sqrt(v1^2 + v2^2 ........ +vn^2)", euclidianNormFunc) "sqrt(v1^2 + v2^2 ........ +vn^2)", euclidianNormFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def exponentiationFunc(maxBase=20, maxExpo=10): def exponentiationFunc(maxBase=20, maxExpo=10):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def factorialFunc(maxInput=6): def factorialFunc(maxInput=6):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def factoringFunc(range_x1=10, range_x2=10): def factoringFunc(range_x1=10, range_x2=10):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def fibonacciSeriesFunc(minNo=1): def fibonacciSeriesFunc(minNo=1):
@@ -22,6 +21,6 @@ def fibonacciSeriesFunc(minNo=1):
return problem, solution return problem, solution
fibonacciSeries = Generator( fibonacci_series = Generator(
"Fibonacci Series", 56, "fibonacci series of first a numbers", "Fibonacci Series", 56, "fibonacci series of first a numbers",
"prints the fibonacci series starting from 0 to a", fibonacciSeriesFunc) "prints the fibonacci series starting from 0 to a", fibonacciSeriesFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def fourthAngleOfQuadriFunc(maxAngle=180): def fourthAngleOfQuadriFunc(maxAngle=180):
@@ -15,7 +14,7 @@ def fourthAngleOfQuadriFunc(maxAngle=180):
return problem, solution return problem, solution
fourthAngleOfQuadrilateral = Generator( fourth_angle_of_quadrilateral = Generator(
"Fourth Angle of Quadrilateral", 49, "Fourth Angle of Quadrilateral", 49,
"Fourth angle of Quadrilateral with angles a,b,c =", "angle4", "Fourth angle of Quadrilateral with angles a,b,c =", "angle4",
fourthAngleOfQuadriFunc) fourthAngleOfQuadriFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def multiplyFractionsFunc(maxVal=10): def multiplyFractionsFunc(maxVal=10):
@@ -33,6 +32,6 @@ def multiplyFractionsFunc(maxVal=10):
return problem, solution return problem, solution
fractionMultiplication = Generator("Fraction Multiplication", 28, fraction_multiplication = Generator("Fraction Multiplication", 28,
"(a/b)*(c/d)=", "x/y", "(a/b)*(c/d)=", "x/y",
multiplyFractionsFunc) multiplyFractionsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def gcdFunc(maxVal=20): def gcdFunc(maxVal=20):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def geometricMeanFunc(maxValue=100, maxNum=4): def geometricMeanFunc(maxValue=100, maxNum=4):
@@ -28,6 +27,6 @@ def geometricMeanFunc(maxValue=100, maxNum=4):
return problem, solution return problem, solution
geometricMean = Generator("Geometric Mean of N Numbers", 67, geometric_mean = Generator("Geometric Mean of N Numbers", 67,
"Geometric mean of n numbers A1 , A2 , ... , An = ", "Geometric mean of n numbers A1 , A2 , ... , An = ",
"(A1*A2*...An)^(1/n) = ans", geometricMeanFunc) "(A1*A2*...An)^(1/n) = ans", geometricMeanFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def geomProgrFunc(number_values=6, def geomProgrFunc(number_values=6,
@@ -24,7 +23,7 @@ def geomProgrFunc(number_values=6,
return problem, solution return problem, solution
geometricprogression = Generator( geometric_progression = Generator(
"Geometric Progression", 66, "Geometric Progression", 66,
"Initial value,Common Ratio,nth Term,Sum till nth term =", "Initial value,Common Ratio,nth Term,Sum till nth term =",
"a,r,ar^n-1,sum(ar^n-1", geomProgrFunc) "a,r,ar^n-1,sum(ar^n-1", geomProgrFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def harmonicMeanFunc(maxValue=100, maxNum=4): def harmonicMeanFunc(maxValue=100, maxNum=4):
@@ -29,7 +28,7 @@ def harmonicMeanFunc(maxValue=100, maxNum=4):
return problem, solution return problem, solution
harmonicMean = Generator("Harmonic Mean of N Numbers", 68, harmonic_mean = Generator("Harmonic Mean of N Numbers", 68,
"Harmonic mean of n numbers A1 , A2 , ... , An = ", "Harmonic mean of n numbers A1 , A2 , ... , An = ",
" n/((1/A1) + (1/A2) + ... + (1/An)) = ans", " n/((1/A1) + (1/A2) + ... + (1/An)) = ans",
harmonicMeanFunc) harmonicMeanFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def hcfFunc(maxVal=20): def hcfFunc(maxVal=20):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def divisionToIntFunc(maxA=25, maxB=25): def divisionToIntFunc(maxA=25, maxB=25):
@@ -14,4 +13,4 @@ def divisionToIntFunc(maxA=25, maxB=25):
return problem, solution return problem, solution
intDivision = Generator("Easy Division", 13, "a/b=", "c", divisionToIntFunc) int_division = Generator("Easy Division", 13, "a/b=", "c", divisionToIntFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def determinantToMatrix22(maxMatrixVal=100): def determinantToMatrix22(maxMatrixVal=100):
@@ -14,6 +13,6 @@ def determinantToMatrix22(maxMatrixVal=100):
return problem, solution return problem, solution
intMatrix22determinant = Generator("Determinant to 2x2 Matrix", 77, int_matrix_22_determinant = Generator("Determinant to 2x2 Matrix", 77,
"Det([[a,b],[c,d]]) =", " a * d - b * c", "Det([[a,b],[c,d]]) =", " a * d - b * c",
determinantToMatrix22) determinantToMatrix22)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def intersectionOfTwoLinesFunc(minM=-10, def intersectionOfTwoLinesFunc(minM=-10,
@@ -67,7 +66,7 @@ def intersectionOfTwoLinesFunc(minM=-10,
return problem, solution return problem, solution
intersectionOfTwoLines = Generator( intersection_of_two_lines = Generator(
"Intersection of Two Lines", 41, "Intersection of Two Lines", 41,
"Find the point of intersection of the two lines: y = m1*x + b1 and y = m2*x + b2", "Find the point of intersection of the two lines: y = m1*x + b1 and y = m2*x + b2",
"(x, y)", intersectionOfTwoLinesFunc) "(x, y)", intersectionOfTwoLinesFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
import sympy import sympy
@@ -79,5 +78,5 @@ def matrixInversion(SquareMatrixDimension=3,
return problem, solution return problem, solution
invertmatrix = Generator("Inverse of a Matrix", 74, "Inverse of a matrix A is", invert_matrix = Generator("Inverse of a Matrix", 74, "Inverse of a matrix A is",
"A^(-1)", matrixInversion) "A^(-1)", matrixInversion)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def lcmFunc(maxVal=20): def lcmFunc(maxVal=20):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def linearEquationsFunc(n=2, varRange=20, coeffRange=20): def linearEquationsFunc(n=2, varRange=20, coeffRange=20):
@@ -30,5 +29,5 @@ def linearEquationsFunc(n=2, varRange=20, coeffRange=20):
return problem, solution return problem, solution
linearEquations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12", linear_equations = Generator("Linear Equations", 26, "2x+5y=20 & 3x+6y=12",
"x=-20 & y=12", linearEquationsFunc) "x=-20 & y=12", linearEquationsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def logFunc(maxBase=3, maxVal=8): def logFunc(maxBase=3, maxVal=8):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def matrixMultiplicationFunc(maxVal=100, max_dim=10): def matrixMultiplicationFunc(maxVal=100, max_dim=10):
@@ -54,6 +53,6 @@ def matrixMultiplicationFuncHelper(inp):
return string return string
matrixMultiplication = Generator("Multiplication of two matrices", 46, matrix_multiplication = Generator("Multiplication of two matrices", 46,
"Multiply two matrices A and B", "C", "Multiply two matrices A and B", "C",
matrixMultiplicationFunc) matrixMultiplicationFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def meanMedianFunc(maxlen=10): def meanMedianFunc(maxlen=10):
@@ -15,6 +14,6 @@ def meanMedianFunc(maxlen=10):
return problem, solution return problem, solution
meanMedian = Generator("Mean and Median", 76, mean_median = Generator("Mean and Median", 76,
"Mean and median of given set of numbers", "Mean and median of given set of numbers",
"Mean, Median", meanMedianFunc) "Mean, Median", meanMedianFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def MidPointOfTwoPointFunc(maxValue=20): def MidPointOfTwoPointFunc(maxValue=20):
@@ -13,6 +12,6 @@ def MidPointOfTwoPointFunc(maxValue=20):
return problem, solution return problem, solution
midPointOfTwoPoint = Generator("Midpoint of the two point", 20, midPoint_of_two_points = Generator("Midpoint of the two point", 20,
"((X1,Y1),(X2,Y2))=", "((X1+X2)/2,(Y1+Y2)/2)", "((X1,Y1),(X2,Y2))=", "((X1+X2)/2,(Y1+Y2)/2)",
MidPointOfTwoPointFunc) MidPointOfTwoPointFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def moduloFunc(maxRes=99, maxModulo=99): def moduloFunc(maxRes=99, maxModulo=99):
@@ -12,4 +11,4 @@ def moduloFunc(maxRes=99, maxModulo=99):
return problem, solution return problem, solution
moduloDivision = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc) modulo_division = Generator("Modulo Division", 5, "a%b=", "c", moduloFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def multiplicationFunc(maxRes=99, maxMulti=99): def multiplicationFunc(maxRes=99, maxMulti=99):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def multiplyComplexNumbersFunc(minRealImaginaryNum=-20, def multiplyComplexNumbersFunc(minRealImaginaryNum=-20,
@@ -13,6 +12,6 @@ def multiplyComplexNumbersFunc(minRealImaginaryNum=-20,
return problem, solution return problem, solution
complexNumMultiply = Generator("Multiplication of 2 complex numbers", 65, multiply_complex_numbers = Generator("Multiplication of 2 complex numbers", 65,
"(x + j) (y + j) = ", "xy + xj + yj -1", "(x + j) (y + j) = ", "xy + xj + yj -1",
multiplyComplexNumbersFunc) multiplyComplexNumbersFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100): def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100):
@@ -14,7 +13,7 @@ def multiplyIntToMatrix22(maxMatrixVal=10, maxRes=100):
return problem, solution return problem, solution
intMatrix22Multiplication = Generator("Integer Multiplication with 2x2 Matrix", multiply_int_to_22_matrix = Generator("Integer Multiplication with 2x2 Matrix",
17, "k * [[a,b],[c,d]]=", 17, "k * [[a,b],[c,d]]=",
"[[k*a,k*b],[k*c,k*d]]", "[[k*a,k*b],[k*c,k*d]]",
multiplyIntToMatrix22) multiplyIntToMatrix22)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def nthFibonacciNumberFunc(maxN=100): def nthFibonacciNumberFunc(maxN=100):
@@ -11,6 +10,6 @@ def nthFibonacciNumberFunc(maxN=100):
return problem, solution return problem, solution
nthFibonacciNumberGen = Generator("nth Fibonacci number", 62, nth_fibonacci_number = Generator("nth Fibonacci number", 62,
"What is the nth Fibonacci number", "Fn", "What is the nth Fibonacci number", "Fn",
nthFibonacciNumberFunc) nthFibonacciNumberFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def percentageFunc(maxValue=99, maxpercentage=99): def percentageFunc(maxValue=99, maxpercentage=99):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def permutationFunc(maxlength=20): def permutationFunc(maxlength=20):
@@ -12,7 +11,7 @@ def permutationFunc(maxlength=20):
return problem, solution return problem, solution
permutations = Generator( permutation = Generator(
"Permutations", 42, "Permutations", 42,
"Total permutations of 4 objects at a time from 10 objects is", "5040", "Total permutations of 4 objects at a time from 10 objects is", "5040",
permutationFunc) permutationFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def powerRuleDifferentiationFunc(maxCoef=10, maxExp=10, maxTerms=5): def powerRuleDifferentiationFunc(maxCoef=10, maxExp=10, maxTerms=5):
@@ -19,6 +18,6 @@ def powerRuleDifferentiationFunc(maxCoef=10, maxExp=10, maxTerms=5):
return problem, solution return problem, solution
powerRuleDifferentiation = Generator("Power Rule Differentiation", 7, "nx^m=", power_rule_differentiation = Generator("Power Rule Differentiation", 7, "nx^m=",
"(n*m)x^(m-1)", "(n*m)x^(m-1)",
powerRuleDifferentiationFunc) powerRuleDifferentiationFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def powerRuleIntegrationFunc(maxCoef=10, maxExp=10, maxTerms=5): def powerRuleIntegrationFunc(maxCoef=10, maxExp=10, maxTerms=5):
@@ -22,5 +21,5 @@ def powerRuleIntegrationFunc(maxCoef=10, maxExp=10, maxTerms=5):
return problem, solution return problem, solution
powerRuleIntegration = Generator("Power Rule Integration", 48, "nx^m=", power_rule_integration = Generator("Power Rule Integration", 48, "nx^m=",
"(n/m)x^(m+1)", powerRuleIntegrationFunc) "(n/m)x^(m+1)", powerRuleIntegrationFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def primeFactorsFunc(minVal=1, maxVal=200): def primeFactorsFunc(minVal=1, maxVal=200):
@@ -23,5 +22,5 @@ def primeFactorsFunc(minVal=1, maxVal=200):
return problem, solution return problem, solution
primeFactors = Generator("Prime Factorisation", 27, "Prime Factors of a =", prime_factors = Generator("Prime Factorisation", 27, "Prime Factors of a =",
"[b, c, d, ...]", primeFactorsFunc) "[b, c, d, ...]", primeFactorsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def profitLossPercentFunc(maxCP=1000, maxSP=1000): def profitLossPercentFunc(maxCP=1000, maxSP=1000):
@@ -17,7 +16,7 @@ def profitLossPercentFunc(maxCP=1000, maxSP=1000):
return problem, solution return problem, solution
profitLossPercent = Generator( profit_loss_percent = Generator(
"Profit or Loss Percent", 63, "Profit or Loss Percent", 63,
"Profit/ Loss percent when CP = cp and SP = sp is: ", "percent", "Profit/ Loss percent when CP = cp and SP = sp is: ", "percent",
profitLossPercentFunc) profitLossPercentFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def pythagoreanTheoremFunc(maxLength=20): def pythagoreanTheoremFunc(maxLength=20):
@@ -12,7 +11,7 @@ def pythagoreanTheoremFunc(maxLength=20):
return problem, solution return problem, solution
pythagoreanTheorem = Generator( pythagorean_theorem = Generator(
"Pythagorean Theorem", 25, "Pythagorean Theorem", 25,
"The hypotenuse of a right triangle given the other two lengths a and b = ", "The hypotenuse of a right triangle given the other two lengths a and b = ",
"hypotenuse", pythagoreanTheoremFunc) "hypotenuse", pythagoreanTheoremFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def quadraticEquation(maxVal=100): def quadraticEquation(maxVal=100):
@@ -16,7 +15,7 @@ def quadraticEquation(maxVal=100):
return problem, solution return problem, solution
quadraticEquationSolve = Generator( quadratic_equation = Generator(
"Quadratic Equation", 50, "Quadratic Equation", 50,
"Find the zeros {x1,x2} of the quadratic equation ax^2+bx+c=0", "x1,x2", "Find the zeros {x1,x2} of the quadratic equation ax^2+bx+c=0", "x1,x2",
quadraticEquation) quadraticEquation)

View File

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

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def sectorAreaFunc(maxRadius=49, maxAngle=359): def sectorAreaFunc(maxRadius=49, maxAngle=359):
@@ -12,6 +11,6 @@ def sectorAreaFunc(maxRadius=49, maxAngle=359):
return problem, solution return problem, solution
sectorArea = Generator("Area of a Sector", 75, sector_area = Generator("Area of a Sector", 75,
"Area of a sector with radius, r and angle, a ", "Area", "Area of a sector with radius, r and angle, a ", "Area",
sectorAreaFunc) sectorAreaFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def simpleInterestFunc(maxPrinciple=10000, maxRate=10, maxTime=10): def simpleInterestFunc(maxPrinciple=10000, maxRate=10, maxTime=10):
@@ -16,7 +15,7 @@ def simpleInterestFunc(maxPrinciple=10000, maxRate=10, maxTime=10):
return problem, solution return problem, solution
simpleInterest = Generator( simple_interest = Generator(
"Simple Interest", 45, "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 = ", "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) "d dollars", simpleInterestFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def squareFunc(maxSquareNum=20): def squareFunc(maxSquareNum=20):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def squareRootFunc(minNo=1, maxNo=12): def squareRootFunc(minNo=1, maxNo=12):
@@ -11,4 +10,4 @@ def squareRootFunc(minNo=1, maxNo=12):
return problem, solution return problem, solution
squareRoot = Generator("Square Root", 6, "sqrt(a)=", "b", squareRootFunc) square_root = Generator("Square Root", 6, "sqrt(a)=", "b", squareRootFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def subtractionFunc(maxMinuend=99, maxDiff=99): def subtractionFunc(maxMinuend=99, maxDiff=99):

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def sumOfAnglesOfPolygonFunc(maxSides=12): def sumOfAnglesOfPolygonFunc(maxSides=12):
@@ -11,6 +10,6 @@ def sumOfAnglesOfPolygonFunc(maxSides=12):
return problem, solution return problem, solution
sumOfAnglesOfPolygon = Generator("Sum of Angles of Polygon", 58, sum_of_polygon_angles = Generator("Sum of Angles of Polygon", 58,
"Sum of angles of polygon with n sides = ", "Sum of angles of polygon with n sides = ",
"sum", sumOfAnglesOfPolygonFunc) "sum", sumOfAnglesOfPolygonFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surdsComparisonFunc(maxValue=100, maxRoot=10): def surdsComparisonFunc(maxValue=100, maxRoot=10):
@@ -18,6 +17,6 @@ def surdsComparisonFunc(maxValue=100, maxRoot=10):
return problem, solution return problem, solution
surdsComparison = Generator("Comparing surds", 55, surds_comparison = Generator("Comparing surds", 55,
"Fill in the blanks a^(1/b) _ c^(1/d)", "</>/=", "Fill in the blanks a^(1/b) _ c^(1/d)", "</>/=",
surdsComparisonFunc) surdsComparisonFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'): def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'):
@@ -14,7 +13,7 @@ def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'):
return problem, solution return problem, solution
surfaceAreaConeGen = Generator( surface_area_cone = Generator(
"Surface Area of cone", 38, "Surface Area of cone", 38,
"Surface area of cone with height = a units and radius = b units is", "Surface area of cone with height = a units and radius = b units is",
"c units^2", surfaceAreaCone) "c units^2", surfaceAreaCone)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surfaceAreaCube(maxSide=20, unit='m'): def surfaceAreaCube(maxSide=20, unit='m'):
@@ -10,6 +9,6 @@ def surfaceAreaCube(maxSide=20, unit='m'):
return problem, solution return problem, solution
surfaceAreaCubeGen = Generator("Surface Area of Cube", 32, surface_area_cube = Generator("Surface Area of Cube", 32,
"Surface area of cube with side a units is", "Surface area of cube with side a units is",
"b units^2", surfaceAreaCube) "b units^2", surfaceAreaCube)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surfaceAreaCuboid(maxSide=20, unit='m'): def surfaceAreaCuboid(maxSide=20, unit='m'):
@@ -13,7 +12,7 @@ def surfaceAreaCuboid(maxSide=20, unit='m'):
return problem, solution return problem, solution
surfaceAreaCuboidGen = Generator( surface_area_cuboid = Generator(
"Surface Area of Cuboid", 33, "Surface Area of Cuboid", 33,
"Surface area of cuboid with sides = a units, b units, c units is", "Surface area of cuboid with sides = a units, b units, c units is",
"d units^2", surfaceAreaCuboid) "d units^2", surfaceAreaCuboid)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'): def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'):
@@ -12,7 +11,7 @@ def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'):
return problem, solution return problem, solution
surfaceAreaCylinderGen = Generator( surface_area_cylinder = Generator(
"Surface Area of Cylinder", 34, "Surface Area of Cylinder", 34,
"Surface area of cylinder with height = a units and radius = b units is", "Surface area of cylinder with height = a units and radius = b units is",
"c units^2", surfaceAreaCylinder) "c units^2", surfaceAreaCylinder)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def surfaceAreaSphere(maxSide=20, unit='m'): def surfaceAreaSphere(maxSide=20, unit='m'):
@@ -11,7 +10,7 @@ def surfaceAreaSphere(maxSide=20, unit='m'):
return problem, solution return problem, solution
surfaceAreaSphereGen = Generator( surface_area_sphere = Generator(
"Surface Area of Sphere", 60, "Surface Area of Sphere", 60,
"Surface area of sphere with radius = a units is", "d units^2", "Surface area of sphere with radius = a units is", "d units^2",
surfaceAreaSphere) surfaceAreaSphere)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def systemOfEquationsFunc(range_x=10, range_y=10, coeff_mult_range=10): def systemOfEquationsFunc(range_x=10, range_y=10, coeff_mult_range=10):
@@ -48,6 +47,6 @@ def systemOfEquationsFunc(range_x=10, range_y=10, coeff_mult_range=10):
# Add random (non-zero) multiple of equations to each other # Add random (non-zero) multiple of equations to each other
systemOfEquations = Generator("Solve a System of Equations in R^2", 23, system_of_equations = Generator("Solve a System of Equations in R^2", 23,
"2x + 5y = 13, -3x - 3y = -6", "x = -1, y = 3", "2x + 5y = 13, -3x - 3y = -6", "x = -1, y = 3",
systemOfEquationsFunc) systemOfEquationsFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def thirdAngleOfTriangleFunc(maxAngle=89): def thirdAngleOfTriangleFunc(maxAngle=89):
@@ -12,6 +11,6 @@ def thirdAngleOfTriangleFunc(maxAngle=89):
return problem, solution return problem, solution
thirdAngleOfTriangle = Generator("Third Angle of Triangle", 22, third_angle_of_triangle = Generator("Third Angle of Triangle", 22,
"Third Angle of the triangle = ", "angle3", "Third Angle of the triangle = ", "angle3",
thirdAngleOfTriangleFunc) thirdAngleOfTriangleFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def isTriangleValidFunc(maxSideLength=50): def isTriangleValidFunc(maxSideLength=50):
@@ -21,6 +20,6 @@ def isTriangleValidFunc(maxSideLength=50):
return problem, solution return problem, solution
doesTriangleExist = Generator("Triangle exists check", 19, valid_triangle = Generator("Triangle exists check", 19,
"Does triangle with sides a, b and c exist?", "Does triangle with sides a, b and c exist?",
"Yes/No", isTriangleValidFunc) "Yes/No", isTriangleValidFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def vectorCrossFunc(minVal=-20, maxVal=20): def vectorCrossFunc(minVal=-20, maxVal=20):
@@ -15,5 +14,5 @@ def vectorCrossFunc(minVal=-20, maxVal=20):
return problem, solution return problem, solution
vectorCross = Generator("Cross Product of 2 Vectors", 43, "a X b = ", "c", vector_cross = Generator("Cross Product of 2 Vectors", 43, "a X b = ", "c",
vectorCrossFunc) vectorCrossFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def vectorDotFunc(minVal=-20, maxVal=20): def vectorDotFunc(minVal=-20, maxVal=20):
@@ -12,5 +11,5 @@ def vectorDotFunc(minVal=-20, maxVal=20):
return problem, solution return problem, solution
vectorDot = Generator("Dot Product of 2 Vectors", 72, "a . b = ", "c", vector_dot = Generator("Dot Product of 2 Vectors", 72, "a . b = ", "c",
vectorDotFunc) vectorDotFunc)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def volumeCone(maxRadius=20, maxHeight=50, unit='m'): def volumeCone(maxRadius=20, maxHeight=50, unit='m'):
@@ -12,7 +11,7 @@ def volumeCone(maxRadius=20, maxHeight=50, unit='m'):
return problem, solution return problem, solution
volumeConeGen = Generator( volume_cone = Generator(
"Volume of cone", 39, "Volume of cone", 39,
"Volume of cone with height = a units and radius = b units is", "Volume of cone with height = a units and radius = b units is",
"c units^3", volumeCone) "c units^3", volumeCone)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def volumeCube(maxSide=20, unit='m'): def volumeCube(maxSide=20, unit='m'):
@@ -11,6 +10,6 @@ def volumeCube(maxSide=20, unit='m'):
return problem, solution return problem, solution
volumeCubeGen = Generator("Volum of Cube", 35, volume_cube = Generator("Volum of Cube", 35,
"Volume of cube with side a units is", "b units^3", "Volume of cube with side a units is", "b units^3",
volumeCube) volumeCube)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def volumeCuboid(maxSide=20, unit='m'): def volumeCuboid(maxSide=20, unit='m'):
@@ -13,7 +12,7 @@ def volumeCuboid(maxSide=20, unit='m'):
return problem, solution return problem, solution
volumeCuboidGen = Generator( volume_cuboid = Generator(
"Volume of Cuboid", 36, "Volume of Cuboid", 36,
"Volume of cuboid with sides = a units, b units, c units is", "d units^3", "Volume of cuboid with sides = a units, b units, c units is", "d units^3",
volumeCuboid) volumeCuboid)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'): def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'):
@@ -12,7 +11,7 @@ def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'):
return problem, solution return problem, solution
volumeCylinderGen = Generator( volume_cylinder = Generator(
"Volume of cylinder", 37, "Volume of cylinder", 37,
"Volume of cylinder with height = a units and radius = b units is", "Volume of cylinder with height = a units and radius = b units is",
"c units^3", volumeCylinder) "c units^3", volumeCylinder)

View File

@@ -1,5 +1,4 @@
from .__init__ import * from .__init__ import *
from ..__init__ import Generator
def volumeSphereFunc(maxRadius=100): def volumeSphereFunc(maxRadius=100):
@@ -11,6 +10,6 @@ def volumeSphereFunc(maxRadius=100):
return problem, solution return problem, solution
volumeSphere = Generator("Volume of Sphere", 61, volume_sphere = Generator("Volume of Sphere", 61,
"Volume of sphere with radius r m = ", "Volume of sphere with radius r m = ",
"(4*pi/3)*r*r*r", volumeSphereFunc) "(4*pi/3)*r*r*r", volumeSphereFunc)

View File

@@ -3,7 +3,7 @@ from mathgenerator import mathgen
# test your generators here # test your generators here
print(mathgen.addition()) print(mathgen.addition())
print(mathgen.genById(70)) print(mathgen.genById(40))
# prints each generator in genList # prints each generator in genList
""" """
@@ -11,5 +11,5 @@ list = mathgen.getGenList()
for item in list: for item in list:
print(item[2]) print(item[2])
print(mathgen.getGenList()) # print(mathgen.getGenList())
""" """

View File

@@ -33,15 +33,15 @@ def test_division(maxRes, maxDivid):
@given(maxRes=st.integers(min_value=1), maxModulo=st.integers(min_value=1)) @given(maxRes=st.integers(min_value=1), maxModulo=st.integers(min_value=1))
def test_moduloDivision(maxRes, maxModulo): def test_modulo_division(maxRes, maxModulo):
assume(maxRes > maxModulo) assume(maxRes > maxModulo)
problem, solution = moduloDivision.func(maxRes, maxModulo) problem, solution = modulo_division.func(maxRes, maxModulo)
assert eval(problem[:-1]) == int(solution) assert eval(problem[:-1]) == int(solution)
@given(minNo=st.integers(min_value=1), @given(minNo=st.integers(min_value=1),
maxNo=st.integers(min_value=1, max_value=2**50)) maxNo=st.integers(min_value=1, max_value=2**50))
def test_squareRoot(minNo, maxNo): def test_square_root(minNo, maxNo):
assume(maxNo > minNo) assume(maxNo > minNo)
problem, solution = squareRoot.func(minNo, maxNo) problem, solution = square_root.func(minNo, maxNo)
assert eval(problem[:-1]) == float(solution) assert eval(problem[:-1]) == float(solution)