From cbede21ddf0811f3644d7fb507d794d83156f6f4 Mon Sep 17 00:00:00 2001 From: lukew3 Date: Tue, 20 Oct 2020 11:30:55 -0400 Subject: [PATCH 1/2] renamed modules and generators to fit pep8 --- mathgenerator/funcs/__init__.py | 176 +++++++++--------- ...fferenceFunc.py => absolute_difference.py} | 3 +- mathgenerator/funcs/addition.py | 1 - ...BtwVectorsFunc.py => angle_btw_vectors.py} | 3 +- ...nAngleFunc.py => angle_regular_polygon.py} | 3 +- ...aOfTriangleFunc.py => area_of_triangle.py} | 7 +- ...mFunc.py => arithmetic_progression_sum.py} | 7 +- ...Func.py => arithmetic_progression_term.py} | 7 +- .../{basicAlgebraFunc.py => basic_algebra.py} | 5 +- ...gonometryFunc.py => basic_trigonometry.py} | 5 +- ...sComplement.py => binary_2s_complement.py} | 7 +- ...ement1sFunc.py => binary_complement_1s.py} | 5 +- ...yToDecimalFunc.py => binary_to_decimal.py} | 7 +- .../{binaryToHexFunc.py => binary_to_hex.py} | 5 +- ...fahrenheit.py => celsius_to_fahrenheit.py} | 5 +- .../{combinationsFunc.py => combinations.py} | 1 - ...commonFactorsFunc.py => common_factors.py} | 7 +- ...eFractionsFunc.py => compare_fractions.py} | 3 +- ...ndInterestFunc.py => compound_interest.py} | 3 +- ...IntervalFunc.py => confidence_interval.py} | 7 +- .../funcs/{cubeRootFunc.py => cube_root.py} | 5 +- .../{dataSummaryFunc.py => data_summary.py} | 5 +- ...alToBinaryFunc.py => decimal_to_binary.py} | 5 +- ...ciToHexaFunc.py => decimal_to_hexadeci.py} | 5 +- ...imalToOctalFunc.py => decimal_to_octal.py} | 4 +- ...lsFunc.py => decimal_to_roman_numerals.py} | 4 +- .../{degreeToRadFunc.py => degree_to_rad.py} | 3 +- ...SumProbFunc.py => dice_sum_probability.py} | 3 +- ...woPointsFunc.py => distance_two_points.py} | 7 +- ...deFractionsFunc.py => divide_fractions.py} | 3 +- .../funcs/{divisionFunc.py => division.py} | 1 - ...euclidianNormFunc.py => euclidian_norm.py} | 7 +- ...xponentiationFunc.py => exponentiation.py} | 1 - .../funcs/{factorialFunc.py => factorial.py} | 1 - .../funcs/{factoringFunc.py => factoring.py} | 1 - ...nacciSeriesFunc.py => fibonacci_series.py} | 3 +- ...nc.py => fourth_angle_of_quadrilateral.py} | 3 +- ...ionsFunc.py => fraction_multiplication.py} | 7 +- mathgenerator/funcs/{gcdFunc.py => gcd.py} | 1 - ...geometricMeanFunc.py => geometric_mean.py} | 7 +- ...mProgrFunc.py => geometric_progression.py} | 3 +- .../{harmonicMeanFunc.py => harmonic_mean.py} | 9 +- mathgenerator/funcs/{hcfFunc.py => hcf.py} | 1 - .../{divisionToIntFunc.py => int_division.py} | 3 +- ...trix22.py => int_matrix_22_determinant.py} | 7 +- ...esFunc.py => intersection_of_two_lines.py} | 3 +- .../{matrixInversion.py => invert_matrix.py} | 5 +- mathgenerator/funcs/{lcmFunc.py => lcm.py} | 1 - ...arEquationsFunc.py => linear_equations.py} | 5 +- mathgenerator/funcs/{logFunc.py => log.py} | 1 - ...cationFunc.py => matrix_multiplication.py} | 7 +- .../{meanMedianFunc.py => mean_median.py} | 7 +- ...PointFunc.py => midpoint_of_two_points.py} | 7 +- .../{moduloFunc.py => modulo_division.py} | 3 +- ...ultiplicationFunc.py => multiplication.py} | 1 - ...ersFunc.py => multiply_complex_numbers.py} | 7 +- ...trix22.py => multiply_int_to_22_matrix.py} | 3 +- ...iNumberFunc.py => nth_fibonacci_number.py} | 7 +- .../{percentageFunc.py => percentage.py} | 1 - .../{permutationFunc.py => permutation.py} | 3 +- ...nFunc.py => power_rule_differentiation.py} | 7 +- ...ationFunc.py => power_rule_integration.py} | 5 +- .../{primeFactorsFunc.py => prime_factors.py} | 5 +- ...sPercentFunc.py => profit_loss_percent.py} | 3 +- ...nTheoremFunc.py => pythagorean_theorem.py} | 3 +- ...raticEquation.py => quadratic_equation.py} | 3 +- .../{radianToDegFunc.py => radian_to_deg.py} | 3 +- .../{sectorAreaFunc.py => sector_area.py} | 7 +- ...mpleInterestFunc.py => simple_interest.py} | 3 +- .../funcs/{squareFunc.py => square.py} | 1 - .../{squareRootFunc.py => square_root.py} | 3 +- .../{subtractionFunc.py => subtraction.py} | 1 - ...olygonFunc.py => sum_of_polygon_angles.py} | 7 +- ...sComparisonFunc.py => surds_comparison.py} | 7 +- ...urfaceAreaCone.py => surface_area_cone.py} | 3 +- ...urfaceAreaCube.py => surface_area_cube.py} | 7 +- ...ceAreaCuboid.py => surface_area_cuboid.py} | 3 +- ...eaCylinder.py => surface_area_cylinder.py} | 3 +- ...ceAreaSphere.py => surface_area_sphere.py} | 3 +- ...quationsFunc.py => system_of_equations.py} | 7 +- ...ngleFunc.py => third_angle_of_triangle.py} | 7 +- ...TriangleValidFunc.py => valid_triangle.py} | 7 +- .../{vectorCrossFunc.py => vector_cross.py} | 5 +- .../funcs/{vectorDotFunc.py => vector_dot.py} | 5 +- .../funcs/{volumeCone.py => volume_cone.py} | 3 +- .../funcs/{volumeCube.py => volume_cube.py} | 7 +- .../{volumeCuboid.py => volume_cuboid.py} | 3 +- .../{volumeCylinder.py => volume_cylinder.py} | 3 +- .../{volumeSphereFunc.py => volume_sphere.py} | 7 +- test.py | 4 +- 90 files changed, 241 insertions(+), 321 deletions(-) rename mathgenerator/funcs/{absoluteDifferenceFunc.py => absolute_difference.py} (88%) rename mathgenerator/funcs/{angleBtwVectorsFunc.py => angle_btw_vectors.py} (93%) rename mathgenerator/funcs/{regularPolygonAngleFunc.py => angle_regular_polygon.py} (86%) rename mathgenerator/funcs/{areaOfTriangleFunc.py => area_of_triangle.py} (65%) rename mathgenerator/funcs/{arithmeticProgressionSumFunc.py => arithmetic_progression_sum.py} (63%) rename mathgenerator/funcs/{arithmeticProgressionTermFunc.py => arithmetic_progression_term.py} (62%) rename mathgenerator/funcs/{basicAlgebraFunc.py => basic_algebra.py} (79%) rename mathgenerator/funcs/{basicTrigonometryFunc.py => basic_trigonometry.py} (81%) rename mathgenerator/funcs/{binary2sComplement.py => binary_2s_complement.py} (76%) rename mathgenerator/funcs/{binaryComplement1sFunc.py => binary_complement_1s.py} (68%) rename mathgenerator/funcs/{BinaryToDecimalFunc.py => binary_to_decimal.py} (53%) rename mathgenerator/funcs/{binaryToHexFunc.py => binary_to_hex.py} (62%) rename mathgenerator/funcs/{celsiustofahrenheit.py => celsius_to_fahrenheit.py} (63%) rename mathgenerator/funcs/{combinationsFunc.py => combinations.py} (95%) rename mathgenerator/funcs/{commonFactorsFunc.py => common_factors.py} (70%) rename mathgenerator/funcs/{compareFractionsFunc.py => compare_fractions.py} (92%) rename mathgenerator/funcs/{compoundInterestFunc.py => compound_interest.py} (93%) rename mathgenerator/funcs/{confidenceIntervalFunc.py => confidence_interval.py} (76%) rename mathgenerator/funcs/{cubeRootFunc.py => cube_root.py} (62%) rename mathgenerator/funcs/{dataSummaryFunc.py => data_summary.py} (80%) rename mathgenerator/funcs/{DecimalToBinaryFunc.py => decimal_to_binary.py} (59%) rename mathgenerator/funcs/{deciToHexaFunc.py => decimal_to_hexadeci.py} (56%) rename mathgenerator/funcs/{decimalToOctalFunc.py => decimal_to_octal.py} (57%) rename mathgenerator/funcs/{decimalToRomanNumeralsFunc.py => decimal_to_roman_numerals.py} (83%) rename mathgenerator/funcs/{degreeToRadFunc.py => degree_to_rad.py} (67%) rename mathgenerator/funcs/{DiceSumProbFunc.py => dice_sum_probability.py} (93%) rename mathgenerator/funcs/{distanceTwoPointsFunc.py => distance_two_points.py} (68%) rename mathgenerator/funcs/{divideFractionsFunc.py => divide_fractions.py} (88%) rename mathgenerator/funcs/{divisionFunc.py => division.py} (90%) rename mathgenerator/funcs/{euclidianNormFunc.py => euclidian_norm.py} (52%) rename mathgenerator/funcs/{exponentiationFunc.py => exponentiation.py} (91%) rename mathgenerator/funcs/{factorialFunc.py => factorial.py} (90%) rename mathgenerator/funcs/{factoringFunc.py => factoring.py} (95%) rename mathgenerator/funcs/{fibonacciSeriesFunc.py => fibonacci_series.py} (91%) rename mathgenerator/funcs/{fourthAngleOfQuadriFunc.py => fourth_angle_of_quadrilateral.py} (88%) rename mathgenerator/funcs/{multiplyFractionsFunc.py => fraction_multiplication.py} (75%) rename mathgenerator/funcs/{gcdFunc.py => gcd.py} (91%) rename mathgenerator/funcs/{geometricMeanFunc.py => geometric_mean.py} (78%) rename mathgenerator/funcs/{geomProgrFunc.py => geometric_progression.py} (94%) rename mathgenerator/funcs/{harmonicMeanFunc.py => harmonic_mean.py} (77%) rename mathgenerator/funcs/{hcfFunc.py => hcf.py} (91%) rename mathgenerator/funcs/{divisionToIntFunc.py => int_division.py} (73%) rename mathgenerator/funcs/{determinantToMatrix22.py => int_matrix_22_determinant.py} (61%) rename mathgenerator/funcs/{intersectionOfTwoLinesFunc.py => intersection_of_two_lines.py} (97%) rename mathgenerator/funcs/{matrixInversion.py => invert_matrix.py} (94%) rename mathgenerator/funcs/{lcmFunc.py => lcm.py} (92%) rename mathgenerator/funcs/{linearEquationsFunc.py => linear_equations.py} (83%) rename mathgenerator/funcs/{logFunc.py => log.py} (90%) rename mathgenerator/funcs/{matrixMultiplicationFunc.py => matrix_multiplication.py} (85%) rename mathgenerator/funcs/{meanMedianFunc.py => mean_median.py} (71%) rename mathgenerator/funcs/{MidPointOfTwoPointFunc.py => midpoint_of_two_points.py} (59%) rename mathgenerator/funcs/{moduloFunc.py => modulo_division.py} (72%) rename mathgenerator/funcs/{multiplicationFunc.py => multiplication.py} (93%) rename mathgenerator/funcs/{multiplyComplexNumbersFunc.py => multiply_complex_numbers.py} (69%) rename mathgenerator/funcs/{multiplyIntToMatrix22.py => multiply_int_to_22_matrix.py} (87%) rename mathgenerator/funcs/{nthFibonacciNumberFunc.py => nth_fibonacci_number.py} (59%) rename mathgenerator/funcs/{percentageFunc.py => percentage.py} (93%) rename mathgenerator/funcs/{permutationFunc.py => permutation.py} (88%) rename mathgenerator/funcs/{powerRuleDifferentiationFunc.py => power_rule_differentiation.py} (69%) rename mathgenerator/funcs/{powerRuleIntegrationFunc.py => power_rule_integration.py} (76%) rename mathgenerator/funcs/{primeFactorsFunc.py => prime_factors.py} (70%) rename mathgenerator/funcs/{profitLossPercentFunc.py => profit_loss_percent.py} (89%) rename mathgenerator/funcs/{pythagoreanTheoremFunc.py => pythagorean_theorem.py} (88%) rename mathgenerator/funcs/{quadraticEquation.py => quadratic_equation.py} (89%) rename mathgenerator/funcs/{radianToDegFunc.py => radian_to_deg.py} (72%) rename mathgenerator/funcs/{sectorAreaFunc.py => sector_area.py} (68%) rename mathgenerator/funcs/{simpleInterestFunc.py => simple_interest.py} (91%) rename mathgenerator/funcs/{squareFunc.py => square.py} (88%) rename mathgenerator/funcs/{squareRootFunc.py => square_root.py} (66%) rename mathgenerator/funcs/{subtractionFunc.py => subtraction.py} (91%) rename mathgenerator/funcs/{sumOfAnglesOfPolygonFunc.py => sum_of_polygon_angles.py} (50%) rename mathgenerator/funcs/{surdsComparisonFunc.py => surds_comparison.py} (72%) rename mathgenerator/funcs/{surfaceAreaCone.py => surface_area_cone.py} (89%) rename mathgenerator/funcs/{surfaceAreaCube.py => surface_area_cube.py} (52%) rename mathgenerator/funcs/{surfaceAreaCuboid.py => surface_area_cuboid.py} (88%) rename mathgenerator/funcs/{surfaceAreaCylinder.py => surface_area_cylinder.py} (88%) rename mathgenerator/funcs/{surfaceAreaSphere.py => surface_area_sphere.py} (85%) rename mathgenerator/funcs/{systemOfEquationsFunc.py => system_of_equations.py} (89%) rename mathgenerator/funcs/{thirdAngleOfTriangleFunc.py => third_angle_of_triangle.py} (57%) rename mathgenerator/funcs/{isTriangleValidFunc.py => valid_triangle.py} (72%) rename mathgenerator/funcs/{vectorCrossFunc.py => vector_cross.py} (72%) rename mathgenerator/funcs/{vectorDotFunc.py => vector_dot.py} (70%) rename mathgenerator/funcs/{volumeCone.py => volume_cone.py} (88%) rename mathgenerator/funcs/{volumeCube.py => volume_cube.py} (55%) rename mathgenerator/funcs/{volumeCuboid.py => volume_cuboid.py} (88%) rename mathgenerator/funcs/{volumeCylinder.py => volume_cylinder.py} (88%) rename mathgenerator/funcs/{volumeSphereFunc.py => volume_sphere.py} (55%) diff --git a/mathgenerator/funcs/__init__.py b/mathgenerator/funcs/__init__.py index 12bf15e..9f82f30 100644 --- a/mathgenerator/funcs/__init__.py +++ b/mathgenerator/funcs/__init__.py @@ -2,91 +2,93 @@ import random import math import fractions +from ..__init__ import * + from .addition import * -from .subtractionFunc import * -from .multiplicationFunc import * -from .divisionFunc import * -from .binaryComplement1sFunc import * -from .moduloFunc import * -from .squareRootFunc import * -from .powerRuleDifferentiationFunc import * -from .squareFunc import * -from .lcmFunc import * -from .gcdFunc import * -from .basicAlgebraFunc import * -from .logFunc import * -from .divisionToIntFunc import * -from .DecimalToBinaryFunc import * -from .BinaryToDecimalFunc import * -from .divideFractionsFunc import * -from .multiplyIntToMatrix22 import * -from .areaOfTriangleFunc import * -from .isTriangleValidFunc import * -from .MidPointOfTwoPointFunc import * -from .factoringFunc import * -from .thirdAngleOfTriangleFunc import * -from .systemOfEquationsFunc import * -from .distanceTwoPointsFunc import * -from .pythagoreanTheoremFunc import * -from .linearEquationsFunc import * -from .primeFactorsFunc import * -from .multiplyFractionsFunc import * -from .regularPolygonAngleFunc import * -from .combinationsFunc import * -from .factorialFunc import * -from .surfaceAreaCube import * -from .surfaceAreaCuboid import * -from .surfaceAreaCylinder import * -from .volumeCube import * -from .volumeCuboid import * -from .volumeCylinder import * -from .surfaceAreaCone import * -from .volumeCone import * -from .commonFactorsFunc import * -from .intersectionOfTwoLinesFunc import * -from .permutationFunc import * -from .vectorCrossFunc import * -from .compareFractionsFunc import * -from .simpleInterestFunc import * -from .matrixMultiplicationFunc import * -from .cubeRootFunc import * -from .powerRuleIntegrationFunc import * -from .fourthAngleOfQuadriFunc import * -from .quadraticEquation import * -from .hcfFunc import * -from .DiceSumProbFunc import * -from .exponentiationFunc import * -from .confidenceIntervalFunc import * -from .surdsComparisonFunc import * -from .fibonacciSeriesFunc import * -from .basicTrigonometryFunc import * -from .sumOfAnglesOfPolygonFunc import * -from .dataSummaryFunc import * -from .surfaceAreaSphere import * -from .volumeSphereFunc import * -from .nthFibonacciNumberFunc import * -from .profitLossPercentFunc import * -from .binaryToHexFunc import * -from .multiplyComplexNumbersFunc import * -from .geomProgrFunc import * -from .geometricMeanFunc import * -from .harmonicMeanFunc import * -from .euclidianNormFunc import * -from .angleBtwVectorsFunc import * -from .absoluteDifferenceFunc import * -from .vectorDotFunc import * -from .binary2sComplement import * -from .matrixInversion import * -from .sectorAreaFunc import * -from .meanMedianFunc import * -from .determinantToMatrix22 import * -from .compoundInterestFunc import * -from .deciToHexaFunc import * -from .percentageFunc import * -from .celsiustofahrenheit import * -from .arithmeticProgressionTermFunc import * -from .arithmeticProgressionSumFunc import * -from .decimalToOctalFunc import * -from .decimalToRomanNumeralsFunc import * -from .degreeToRadFunc import * -from .radianToDegFunc import * +from .subtraction import * +from .multiplication import * +from .division import * +from .binary_complement_1s import * +from .modulo_division import * +from .square_root import * +from .power_rule_differentiation import * +from .square import * +from .lcm import * +from .gcd import * +from .basic_algebra import * +from .log import * +from .int_division import * +from .decimal_to_binary import * +from .binary_to_decimal import * +from .divide_fractions import * +from .multiply_int_to_22_matrix import * +from .area_of_triangle import * +from .valid_triangle import * +from .midpoint_of_two_points import * +from .factoring import * +from .third_angle_of_triangle import * +from .system_of_equations import * +from .distance_two_points import * +from .pythagorean_theorem import * +from .linear_equations import * +from .prime_factors import * +from .fraction_multiplication import * +from .angle_regular_polygon import * +from .combinations import * +from .factorial import * +from .surface_area_cube import * +from .surface_area_cuboid import * +from .surface_area_cylinder import * +from .volume_cube import * +from .volume_cuboid import * +from .volume_cylinder import * +from .surface_area_cone import * +from .volume_cone import * +from .common_factors import * +from .intersection_of_two_lines import * +from .permutation import * +from .vector_cross import * +from .compare_fractions import * +from .simple_interest import * +from .matrix_multiplication import * +from .cube_root import * +from .power_rule_integration import * +from .fourth_angle_of_quadrilateral import * +from .quadratic_equation import * +from .hcf import * +from .dice_sum_probability import * +from .exponentiation import * +from .confidence_interval import * +from .surds_comparison import * +from .fibonacci_series import * +from .basic_trigonometry import * +from .sum_of_polygon_angles import * +from .data_summary import * +from .surface_area_sphere import * +from .volume_sphere import * +from .nth_fibonacci_number import * +from .profit_loss_percent import * +from .binary_to_hex import * +from .multiply_complex_numbers import * +from .geometric_progression import * +from .geometric_mean import * +from .harmonic_mean import * +from .euclidian_norm import * +from .angle_btw_vectors import * +from .absolute_difference import * +from .vector_dot import * +from .binary_2s_complement import * +from .invert_matrix import * +from .sector_area import * +from .mean_median import * +from .int_matrix_22_determinant import * +from .compound_interest import * +from .decimal_to_hexadeci import * +from .percentage import * +from .celsius_to_fahrenheit import * +from .arithmetic_progression_term import * +from .arithmetic_progression_sum import * +from .decimal_to_octal import * +from .decimal_to_roman_numerals import * +from .degree_to_rad import * +from .radian_to_deg import * diff --git a/mathgenerator/funcs/absoluteDifferenceFunc.py b/mathgenerator/funcs/absolute_difference.py similarity index 88% rename from mathgenerator/funcs/absoluteDifferenceFunc.py rename to mathgenerator/funcs/absolute_difference.py index 755e049..fae1fb0 100644 --- a/mathgenerator/funcs/absoluteDifferenceFunc.py +++ b/mathgenerator/funcs/absolute_difference.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def absoluteDifferenceFunc(maxA=100, maxB=100): @@ -13,7 +12,7 @@ def absoluteDifferenceFunc(maxA=100, maxB=100): return problem, solution -absoluteDifference = Generator( +absolute_difference = Generator( "Absolute difference between two numbers", 71, "Absolute difference betweeen two numbers a and b =", "|a-b|", absoluteDifferenceFunc) diff --git a/mathgenerator/funcs/addition.py b/mathgenerator/funcs/addition.py index df74496..cab6dac 100644 --- a/mathgenerator/funcs/addition.py +++ b/mathgenerator/funcs/addition.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def additionFunc(maxSum=99, maxAddend=50): diff --git a/mathgenerator/funcs/angleBtwVectorsFunc.py b/mathgenerator/funcs/angle_btw_vectors.py similarity index 93% rename from mathgenerator/funcs/angleBtwVectorsFunc.py rename to mathgenerator/funcs/angle_btw_vectors.py index 9d8d817..f3b8a65 100644 --- a/mathgenerator/funcs/angleBtwVectorsFunc.py +++ b/mathgenerator/funcs/angle_btw_vectors.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator import math @@ -23,7 +22,7 @@ def angleBtwVectorsFunc(maxEltAmt=20): return problem, solution -angleBtwVectors = Generator( +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) diff --git a/mathgenerator/funcs/regularPolygonAngleFunc.py b/mathgenerator/funcs/angle_regular_polygon.py similarity index 86% rename from mathgenerator/funcs/regularPolygonAngleFunc.py rename to mathgenerator/funcs/angle_regular_polygon.py index a264c5a..90f2c71 100644 --- a/mathgenerator/funcs/regularPolygonAngleFunc.py +++ b/mathgenerator/funcs/angle_regular_polygon.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def regularPolygonAngleFunc(minVal=3, maxVal=20): @@ -11,7 +10,7 @@ def regularPolygonAngleFunc(minVal=3, maxVal=20): return problem, solution -angleRegularPolygon = Generator( +angle_regular_polygon = Generator( "Angle of a Regular Polygon", 29, "Find the angle of a regular polygon with 6 sides", "120", regularPolygonAngleFunc) diff --git a/mathgenerator/funcs/areaOfTriangleFunc.py b/mathgenerator/funcs/area_of_triangle.py similarity index 65% rename from mathgenerator/funcs/areaOfTriangleFunc.py rename to mathgenerator/funcs/area_of_triangle.py index c49167c..488a997 100644 --- a/mathgenerator/funcs/areaOfTriangleFunc.py +++ b/mathgenerator/funcs/area_of_triangle.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20): @@ -16,6 +15,6 @@ def areaOfTriangleFunc(maxA=20, maxB=20, maxC=20): return problem, solution -areaOfTriangle = Generator("Area of Triangle", 18, - "Area of Triangle with side lengths a, b, c = ", - "area", areaOfTriangleFunc) +area_of_triangle = Generator("Area of Triangle", 18, + "Area of Triangle with side lengths a, b, c = ", + "area", areaOfTriangleFunc) diff --git a/mathgenerator/funcs/arithmeticProgressionSumFunc.py b/mathgenerator/funcs/arithmetic_progression_sum.py similarity index 63% rename from mathgenerator/funcs/arithmeticProgressionSumFunc.py rename to mathgenerator/funcs/arithmetic_progression_sum.py index 294cb7f..e376c3f 100644 --- a/mathgenerator/funcs/arithmeticProgressionSumFunc.py +++ b/mathgenerator/funcs/arithmetic_progression_sum.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100): @@ -14,6 +13,6 @@ def arithmeticProgressionSumFunc(maxd=100, maxa=100, maxn=100): return problem, solution -arithmeticProgressionSum = Generator("AP Sum Calculation", 83, - "Find the sum of first n terms of the AP series: a1, a2, a3 ...", - "Sum", arithmeticProgressionSumFunc) +arithmetic_progression_sum = Generator("AP Sum Calculation", 83, + "Find the sum of first n terms of the AP series: a1, a2, a3 ...", + "Sum", arithmeticProgressionSumFunc) diff --git a/mathgenerator/funcs/arithmeticProgressionTermFunc.py b/mathgenerator/funcs/arithmetic_progression_term.py similarity index 62% rename from mathgenerator/funcs/arithmeticProgressionTermFunc.py rename to mathgenerator/funcs/arithmetic_progression_term.py index e549c18..8468921 100644 --- a/mathgenerator/funcs/arithmeticProgressionTermFunc.py +++ b/mathgenerator/funcs/arithmetic_progression_term.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100): @@ -14,6 +13,6 @@ def arithmeticProgressionTermFunc(maxd=100, maxa=100, maxn=100): return problem, solution -arithmeticProgressionTerm = Generator("AP Term Calculation", 82, - "Find the term number n of the AP series: a1, a2, a3 ...", - "a-n", arithmeticProgressionTermFunc) +arithmetic_progression_term = Generator("AP Term Calculation", 82, + "Find the term number n of the AP series: a1, a2, a3 ...", + "a-n", arithmeticProgressionTermFunc) diff --git a/mathgenerator/funcs/basicAlgebraFunc.py b/mathgenerator/funcs/basic_algebra.py similarity index 79% rename from mathgenerator/funcs/basicAlgebraFunc.py rename to mathgenerator/funcs/basic_algebra.py index 504ac41..0626cf8 100644 --- a/mathgenerator/funcs/basicAlgebraFunc.py +++ b/mathgenerator/funcs/basic_algebra.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def basicAlgebraFunc(maxVariable=10): @@ -26,5 +25,5 @@ def basicAlgebraFunc(maxVariable=10): return problem, solution -basicAlgebra = Generator("Basic Algebra", 11, "ax + b = c", "d", - basicAlgebraFunc) +basic_algebra = Generator("Basic Algebra", 11, "ax + b = c", "d", + basicAlgebraFunc) diff --git a/mathgenerator/funcs/basicTrigonometryFunc.py b/mathgenerator/funcs/basic_trigonometry.py similarity index 81% rename from mathgenerator/funcs/basicTrigonometryFunc.py rename to mathgenerator/funcs/basic_trigonometry.py index da6d97c..2992034 100644 --- a/mathgenerator/funcs/basicTrigonometryFunc.py +++ b/mathgenerator/funcs/basic_trigonometry.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator # Handles degrees in quadrant one @@ -26,5 +25,5 @@ def basicTrigonometryFunc(angles=[0, 30, 45, 60, 90], return problem, solution -basicTrigonometry = Generator("Trigonometric Values", 57, "What is sin(X)?", - "ans", basicTrigonometryFunc) +basic_trigonometry = Generator("Trigonometric Values", 57, "What is sin(X)?", + "ans", basicTrigonometryFunc) diff --git a/mathgenerator/funcs/binary2sComplement.py b/mathgenerator/funcs/binary_2s_complement.py similarity index 76% rename from mathgenerator/funcs/binary2sComplement.py rename to mathgenerator/funcs/binary_2s_complement.py index 891990d..f053020 100644 --- a/mathgenerator/funcs/binary2sComplement.py +++ b/mathgenerator/funcs/binary_2s_complement.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def binary2sComplementFunc(maxDigits=10): @@ -29,6 +28,6 @@ def binary2sComplementFunc(maxDigits=10): return problem, solution -binary2sComplement = Generator("Binary 2's Complement", 73, - "2's complement of 11010110 =", "101010", - binary2sComplementFunc) +binary_2s_complement = Generator("Binary 2's Complement", 73, + "2's complement of 11010110 =", "101010", + binary2sComplementFunc) diff --git a/mathgenerator/funcs/binaryComplement1sFunc.py b/mathgenerator/funcs/binary_complement_1s.py similarity index 68% rename from mathgenerator/funcs/binaryComplement1sFunc.py rename to mathgenerator/funcs/binary_complement_1s.py index f748af5..da6c481 100644 --- a/mathgenerator/funcs/binaryComplement1sFunc.py +++ b/mathgenerator/funcs/binary_complement_1s.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def binaryComplement1sFunc(maxDigits=10): @@ -16,5 +15,5 @@ def binaryComplement1sFunc(maxDigits=10): return problem, solution -binaryComplement1s = Generator("Binary Complement 1s", 4, "1010=", "0101", - binaryComplement1sFunc) +binary_complement_1s = Generator("Binary Complement 1s", 4, "1010=", "0101", + binaryComplement1sFunc) diff --git a/mathgenerator/funcs/BinaryToDecimalFunc.py b/mathgenerator/funcs/binary_to_decimal.py similarity index 53% rename from mathgenerator/funcs/BinaryToDecimalFunc.py rename to mathgenerator/funcs/binary_to_decimal.py index 01fb780..f7e0aa8 100644 --- a/mathgenerator/funcs/BinaryToDecimalFunc.py +++ b/mathgenerator/funcs/binary_to_decimal.py @@ -1,8 +1,7 @@ from .__init__ import * -from ..__init__ import Generator -def BinaryToDecimalFunc(max_dig=10): +def binaryToDecimalFunc(max_dig=10): problem = '' for i in range(random.randint(1, max_dig)): @@ -13,5 +12,5 @@ def BinaryToDecimalFunc(max_dig=10): return problem, solution -binaryToDecimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b", - BinaryToDecimalFunc) +binary_to_decimal = Generator("Binary to Decimal", 15, "Decimal of a=", "b", + binaryToDecimalFunc) diff --git a/mathgenerator/funcs/binaryToHexFunc.py b/mathgenerator/funcs/binary_to_hex.py similarity index 62% rename from mathgenerator/funcs/binaryToHexFunc.py rename to mathgenerator/funcs/binary_to_hex.py index 12dbe7f..77b03b1 100644 --- a/mathgenerator/funcs/binaryToHexFunc.py +++ b/mathgenerator/funcs/binary_to_hex.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def binaryToHexFunc(max_dig=10): @@ -12,5 +11,5 @@ def binaryToHexFunc(max_dig=10): return problem, solution -binaryToHex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=", "b", - binaryToHexFunc) +binary_to_hex = Generator("Binary to Hexidecimal", 64, "Hexidecimal of a=", "b", + binaryToHexFunc) diff --git a/mathgenerator/funcs/celsiustofahrenheit.py b/mathgenerator/funcs/celsius_to_fahrenheit.py similarity index 63% rename from mathgenerator/funcs/celsiustofahrenheit.py rename to mathgenerator/funcs/celsius_to_fahrenheit.py index 0e66be8..45122d0 100644 --- a/mathgenerator/funcs/celsiustofahrenheit.py +++ b/mathgenerator/funcs/celsius_to_fahrenheit.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def celsiustofahrenheitFunc(maxTemp=100): @@ -10,5 +9,5 @@ def celsiustofahrenheitFunc(maxTemp=100): return problem, solution -celsiustofahrenheit = Generator("Celsius To Fahrenheit", 81, - "(C +(9/5))+32=", "F", celsiustofahrenheitFunc) +celsius_to_fahrenheit = Generator("Celsius To Fahrenheit", 81, + "(C +(9/5))+32=", "F", celsiustofahrenheitFunc) diff --git a/mathgenerator/funcs/combinationsFunc.py b/mathgenerator/funcs/combinations.py similarity index 95% rename from mathgenerator/funcs/combinationsFunc.py rename to mathgenerator/funcs/combinations.py index ca42532..60c7b41 100644 --- a/mathgenerator/funcs/combinationsFunc.py +++ b/mathgenerator/funcs/combinations.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def combinationsFunc(maxlength=20): diff --git a/mathgenerator/funcs/commonFactorsFunc.py b/mathgenerator/funcs/common_factors.py similarity index 70% rename from mathgenerator/funcs/commonFactorsFunc.py rename to mathgenerator/funcs/common_factors.py index 929c48e..a783909 100644 --- a/mathgenerator/funcs/commonFactorsFunc.py +++ b/mathgenerator/funcs/common_factors.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def commonFactorsFunc(maxVal=100): @@ -25,6 +24,6 @@ def commonFactorsFunc(maxVal=100): return problem, solution -commonFactors = Generator("Common Factors", 40, - "Common Factors of {a} and {b} = ", "[c, d, ...]", - commonFactorsFunc) +common_factors = Generator("Common Factors", 40, + "Common Factors of {a} and {b} = ", "[c, d, ...]", + commonFactorsFunc) diff --git a/mathgenerator/funcs/compareFractionsFunc.py b/mathgenerator/funcs/compare_fractions.py similarity index 92% rename from mathgenerator/funcs/compareFractionsFunc.py rename to mathgenerator/funcs/compare_fractions.py index 19ba5c9..53fe7a0 100644 --- a/mathgenerator/funcs/compareFractionsFunc.py +++ b/mathgenerator/funcs/compare_fractions.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def compareFractionsFunc(maxVal=10): @@ -27,7 +26,7 @@ def compareFractionsFunc(maxVal=10): return problem, solution -compareFractions = Generator( +compare_fractions = Generator( "Compare Fractions", 44, "Which symbol represents the comparison between a/b and c/d?", ">//=", - surdsComparisonFunc) +surds_comparison = Generator("Comparing surds", 55, + "Fill in the blanks a^(1/b) _ c^(1/d)", "/=", + surdsComparisonFunc) diff --git a/mathgenerator/funcs/surfaceAreaCone.py b/mathgenerator/funcs/surface_area_cone.py similarity index 89% rename from mathgenerator/funcs/surfaceAreaCone.py rename to mathgenerator/funcs/surface_area_cone.py index 8497460..2d86c5e 100644 --- a/mathgenerator/funcs/surfaceAreaCone.py +++ b/mathgenerator/funcs/surface_area_cone.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'): @@ -14,7 +13,7 @@ def surfaceAreaCone(maxRadius=20, maxHeight=50, unit='m'): return problem, solution -surfaceAreaConeGen = Generator( +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) diff --git a/mathgenerator/funcs/surfaceAreaCube.py b/mathgenerator/funcs/surface_area_cube.py similarity index 52% rename from mathgenerator/funcs/surfaceAreaCube.py rename to mathgenerator/funcs/surface_area_cube.py index 42b07f4..f2f4a99 100644 --- a/mathgenerator/funcs/surfaceAreaCube.py +++ b/mathgenerator/funcs/surface_area_cube.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def surfaceAreaCube(maxSide=20, unit='m'): @@ -10,6 +9,6 @@ def surfaceAreaCube(maxSide=20, unit='m'): return problem, solution -surfaceAreaCubeGen = Generator("Surface Area of Cube", 32, - "Surface area of cube with side a units is", - "b units^2", surfaceAreaCube) +surface_area_cube = Generator("Surface Area of Cube", 32, + "Surface area of cube with side a units is", + "b units^2", surfaceAreaCube) diff --git a/mathgenerator/funcs/surfaceAreaCuboid.py b/mathgenerator/funcs/surface_area_cuboid.py similarity index 88% rename from mathgenerator/funcs/surfaceAreaCuboid.py rename to mathgenerator/funcs/surface_area_cuboid.py index 0889441..723217c 100644 --- a/mathgenerator/funcs/surfaceAreaCuboid.py +++ b/mathgenerator/funcs/surface_area_cuboid.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def surfaceAreaCuboid(maxSide=20, unit='m'): @@ -13,7 +12,7 @@ def surfaceAreaCuboid(maxSide=20, unit='m'): return problem, solution -surfaceAreaCuboidGen = Generator( +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) diff --git a/mathgenerator/funcs/surfaceAreaCylinder.py b/mathgenerator/funcs/surface_area_cylinder.py similarity index 88% rename from mathgenerator/funcs/surfaceAreaCylinder.py rename to mathgenerator/funcs/surface_area_cylinder.py index 3a7a1e8..bdbed93 100644 --- a/mathgenerator/funcs/surfaceAreaCylinder.py +++ b/mathgenerator/funcs/surface_area_cylinder.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'): @@ -12,7 +11,7 @@ def surfaceAreaCylinder(maxRadius=20, maxHeight=50, unit='m'): return problem, solution -surfaceAreaCylinderGen = Generator( +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) diff --git a/mathgenerator/funcs/surfaceAreaSphere.py b/mathgenerator/funcs/surface_area_sphere.py similarity index 85% rename from mathgenerator/funcs/surfaceAreaSphere.py rename to mathgenerator/funcs/surface_area_sphere.py index 86a9456..bc5e91a 100644 --- a/mathgenerator/funcs/surfaceAreaSphere.py +++ b/mathgenerator/funcs/surface_area_sphere.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def surfaceAreaSphere(maxSide=20, unit='m'): @@ -11,7 +10,7 @@ def surfaceAreaSphere(maxSide=20, unit='m'): return problem, solution -surfaceAreaSphereGen = Generator( +surface_area_sphere = Generator( "Surface Area of Sphere", 60, "Surface area of sphere with radius = a units is", "d units^2", surfaceAreaSphere) diff --git a/mathgenerator/funcs/systemOfEquationsFunc.py b/mathgenerator/funcs/system_of_equations.py similarity index 89% rename from mathgenerator/funcs/systemOfEquationsFunc.py rename to mathgenerator/funcs/system_of_equations.py index ef00b0e..c35e549 100644 --- a/mathgenerator/funcs/systemOfEquationsFunc.py +++ b/mathgenerator/funcs/system_of_equations.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator 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 -systemOfEquations = Generator("Solve a System of Equations in R^2", 23, - "2x + 5y = 13, -3x - 3y = -6", "x = -1, y = 3", - systemOfEquationsFunc) +system_of_equations = Generator("Solve a System of Equations in R^2", 23, + "2x + 5y = 13, -3x - 3y = -6", "x = -1, y = 3", + systemOfEquationsFunc) diff --git a/mathgenerator/funcs/thirdAngleOfTriangleFunc.py b/mathgenerator/funcs/third_angle_of_triangle.py similarity index 57% rename from mathgenerator/funcs/thirdAngleOfTriangleFunc.py rename to mathgenerator/funcs/third_angle_of_triangle.py index f5f7afb..b41ff35 100644 --- a/mathgenerator/funcs/thirdAngleOfTriangleFunc.py +++ b/mathgenerator/funcs/third_angle_of_triangle.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def thirdAngleOfTriangleFunc(maxAngle=89): @@ -12,6 +11,6 @@ def thirdAngleOfTriangleFunc(maxAngle=89): return problem, solution -thirdAngleOfTriangle = Generator("Third Angle of Triangle", 22, - "Third Angle of the triangle = ", "angle3", - thirdAngleOfTriangleFunc) +third_angle_of_triangle = Generator("Third Angle of Triangle", 22, + "Third Angle of the triangle = ", "angle3", + thirdAngleOfTriangleFunc) diff --git a/mathgenerator/funcs/isTriangleValidFunc.py b/mathgenerator/funcs/valid_triangle.py similarity index 72% rename from mathgenerator/funcs/isTriangleValidFunc.py rename to mathgenerator/funcs/valid_triangle.py index 19a4240..e8a5128 100644 --- a/mathgenerator/funcs/isTriangleValidFunc.py +++ b/mathgenerator/funcs/valid_triangle.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def isTriangleValidFunc(maxSideLength=50): @@ -21,6 +20,6 @@ def isTriangleValidFunc(maxSideLength=50): return problem, solution -doesTriangleExist = Generator("Triangle exists check", 19, - "Does triangle with sides a, b and c exist?", - "Yes/No", isTriangleValidFunc) +valid_triangle = Generator("Triangle exists check", 19, + "Does triangle with sides a, b and c exist?", + "Yes/No", isTriangleValidFunc) diff --git a/mathgenerator/funcs/vectorCrossFunc.py b/mathgenerator/funcs/vector_cross.py similarity index 72% rename from mathgenerator/funcs/vectorCrossFunc.py rename to mathgenerator/funcs/vector_cross.py index 318beec..92b82a9 100644 --- a/mathgenerator/funcs/vectorCrossFunc.py +++ b/mathgenerator/funcs/vector_cross.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def vectorCrossFunc(minVal=-20, maxVal=20): @@ -15,5 +14,5 @@ def vectorCrossFunc(minVal=-20, maxVal=20): return problem, solution -vectorCross = Generator("Cross Product of 2 Vectors", 43, "a X b = ", "c", - vectorCrossFunc) +vector_cross = Generator("Cross Product of 2 Vectors", 43, "a X b = ", "c", + vectorCrossFunc) diff --git a/mathgenerator/funcs/vectorDotFunc.py b/mathgenerator/funcs/vector_dot.py similarity index 70% rename from mathgenerator/funcs/vectorDotFunc.py rename to mathgenerator/funcs/vector_dot.py index 0ca2609..608ce66 100644 --- a/mathgenerator/funcs/vectorDotFunc.py +++ b/mathgenerator/funcs/vector_dot.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def vectorDotFunc(minVal=-20, maxVal=20): @@ -12,5 +11,5 @@ def vectorDotFunc(minVal=-20, maxVal=20): return problem, solution -vectorDot = Generator("Dot Product of 2 Vectors", 72, "a . b = ", "c", - vectorDotFunc) +vector_dot = Generator("Dot Product of 2 Vectors", 72, "a . b = ", "c", + vectorDotFunc) diff --git a/mathgenerator/funcs/volumeCone.py b/mathgenerator/funcs/volume_cone.py similarity index 88% rename from mathgenerator/funcs/volumeCone.py rename to mathgenerator/funcs/volume_cone.py index 85dbd55..39a3a26 100644 --- a/mathgenerator/funcs/volumeCone.py +++ b/mathgenerator/funcs/volume_cone.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def volumeCone(maxRadius=20, maxHeight=50, unit='m'): @@ -12,7 +11,7 @@ def volumeCone(maxRadius=20, maxHeight=50, unit='m'): return problem, solution -volumeConeGen = Generator( +volume_cone = Generator( "Volume of cone", 39, "Volume of cone with height = a units and radius = b units is", "c units^3", volumeCone) diff --git a/mathgenerator/funcs/volumeCube.py b/mathgenerator/funcs/volume_cube.py similarity index 55% rename from mathgenerator/funcs/volumeCube.py rename to mathgenerator/funcs/volume_cube.py index ff1ac76..1de5984 100644 --- a/mathgenerator/funcs/volumeCube.py +++ b/mathgenerator/funcs/volume_cube.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def volumeCube(maxSide=20, unit='m'): @@ -11,6 +10,6 @@ def volumeCube(maxSide=20, unit='m'): return problem, solution -volumeCubeGen = Generator("Volum of Cube", 35, - "Volume of cube with side a units is", "b units^3", - volumeCube) +volume_cube = Generator("Volum of Cube", 35, + "Volume of cube with side a units is", "b units^3", + volumeCube) diff --git a/mathgenerator/funcs/volumeCuboid.py b/mathgenerator/funcs/volume_cuboid.py similarity index 88% rename from mathgenerator/funcs/volumeCuboid.py rename to mathgenerator/funcs/volume_cuboid.py index d25d753..a1eee6f 100644 --- a/mathgenerator/funcs/volumeCuboid.py +++ b/mathgenerator/funcs/volume_cuboid.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def volumeCuboid(maxSide=20, unit='m'): @@ -13,7 +12,7 @@ def volumeCuboid(maxSide=20, unit='m'): return problem, solution -volumeCuboidGen = Generator( +volume_cuboid = Generator( "Volume of Cuboid", 36, "Volume of cuboid with sides = a units, b units, c units is", "d units^3", volumeCuboid) diff --git a/mathgenerator/funcs/volumeCylinder.py b/mathgenerator/funcs/volume_cylinder.py similarity index 88% rename from mathgenerator/funcs/volumeCylinder.py rename to mathgenerator/funcs/volume_cylinder.py index e021aab..28b89a1 100644 --- a/mathgenerator/funcs/volumeCylinder.py +++ b/mathgenerator/funcs/volume_cylinder.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'): @@ -12,7 +11,7 @@ def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'): return problem, solution -volumeCylinderGen = Generator( +volume_cylinder = Generator( "Volume of cylinder", 37, "Volume of cylinder with height = a units and radius = b units is", "c units^3", volumeCylinder) diff --git a/mathgenerator/funcs/volumeSphereFunc.py b/mathgenerator/funcs/volume_sphere.py similarity index 55% rename from mathgenerator/funcs/volumeSphereFunc.py rename to mathgenerator/funcs/volume_sphere.py index 038607e..b686bd4 100644 --- a/mathgenerator/funcs/volumeSphereFunc.py +++ b/mathgenerator/funcs/volume_sphere.py @@ -1,5 +1,4 @@ from .__init__ import * -from ..__init__ import Generator def volumeSphereFunc(maxRadius=100): @@ -11,6 +10,6 @@ def volumeSphereFunc(maxRadius=100): return problem, solution -volumeSphere = Generator("Volume of Sphere", 61, - "Volume of sphere with radius r m = ", - "(4*pi/3)*r*r*r", volumeSphereFunc) +volume_sphere = Generator("Volume of Sphere", 61, + "Volume of sphere with radius r m = ", + "(4*pi/3)*r*r*r", volumeSphereFunc) diff --git a/test.py b/test.py index 8cd6bd0..9625e78 100644 --- a/test.py +++ b/test.py @@ -3,7 +3,7 @@ from mathgenerator import mathgen # test your generators here print(mathgen.addition()) -print(mathgen.genById(70)) +print(mathgen.genById(40)) # prints each generator in genList """ @@ -11,5 +11,5 @@ list = mathgen.getGenList() for item in list: print(item[2]) -print(mathgen.getGenList()) +# print(mathgen.getGenList()) """ From 1f708af50f7374289f69e0c0b8671f5ae40f873e Mon Sep 17 00:00:00 2001 From: lukew3 Date: Tue, 20 Oct 2020 11:37:59 -0400 Subject: [PATCH 2/2] fixed tests --- tests/test_mathgen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_mathgen.py b/tests/test_mathgen.py index ed9066b..745b9dc 100644 --- a/tests/test_mathgen.py +++ b/tests/test_mathgen.py @@ -33,15 +33,15 @@ def test_division(maxRes, maxDivid): @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) - problem, solution = moduloDivision.func(maxRes, maxModulo) + problem, solution = modulo_division.func(maxRes, maxModulo) assert eval(problem[:-1]) == int(solution) @given(minNo=st.integers(min_value=1), maxNo=st.integers(min_value=1, max_value=2**50)) -def test_squareRoot(minNo, maxNo): +def test_square_root(minNo, maxNo): assume(maxNo > minNo) - problem, solution = squareRoot.func(minNo, maxNo) + problem, solution = square_root.func(minNo, maxNo) assert eval(problem[:-1]) == float(solution)