mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
perimeter of polygons fix
This commit is contained in:
@@ -95,9 +95,9 @@ from .radian_to_deg import *
|
||||
from .differentiation import *
|
||||
from .definite_integral import *
|
||||
from .is_prime import *
|
||||
from .perimeter_of_polygons import *
|
||||
from .bcd_to_decimal import *
|
||||
from .complex_to_polar import *
|
||||
from .set_operation import *
|
||||
from .base_conversion import *
|
||||
from .curved_surface_area_cylinder import *
|
||||
from .perimeter_of_polygons import *
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from .__init__ import *
|
||||
from ..__init__ import Generator
|
||||
|
||||
|
||||
def perimeterOfPolygons(maxSides=12, maxLength=120):
|
||||
@@ -7,8 +6,13 @@ def perimeterOfPolygons(maxSides=12, maxLength=120):
|
||||
sides = []
|
||||
for x in range(size_of_sides):
|
||||
sides.append(random.randint(1, maxLength))
|
||||
problem = "The perimeter of a " + str(size_of_sides) + " sided polygon with lengths of " + str(sides) + "cm is: "
|
||||
problem = "The perimeter of a " + str(size_of_sides) + \
|
||||
" sided polygon with lengths of " + str(sides) + "cm is: "
|
||||
solution = 0
|
||||
for y in range(len(sides)):
|
||||
solution += sides[y]
|
||||
return problem, solution
|
||||
|
||||
|
||||
perimeter_of_polygons = Generator(
|
||||
"Perimeter of Polygons", 96, "The perimeter of a x sided polygon with lengths of y cm is: ", "z", perimeterOfPolygons)
|
||||
|
||||
Reference in New Issue
Block a user