renamed modules and generators to fit pep8

This commit is contained in:
lukew3
2020-10-20 11:30:55 -04:00
parent 2ac4032b8a
commit cbede21ddf
90 changed files with 241 additions and 321 deletions

View File

@@ -0,0 +1,19 @@
from .__init__ import *
def distanceTwoPointsFunc(maxValXY=20, minValXY=-20):
point1X = random.randint(minValXY, maxValXY + 1)
point1Y = random.randint(minValXY, maxValXY + 1)
point2X = random.randint(minValXY, maxValXY + 1)
point2Y = random.randint(minValXY, maxValXY + 1)
distanceSq = (point1X - point2X)**2 + (point1Y - point2Y)**2
solution = f"sqrt({distanceSq})"
problem = f"Find the distance between ({point1X}, {point1Y}) and ({point2X}, {point2Y})"
return problem, solution
distance_two_points = Generator("Distance between 2 points", 24,
"Find the distance between (x1,y1) and (x2,y2)",
"sqrt(distanceSquared)", distanceTwoPointsFunc)