mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
12 lines
342 B
Python
12 lines
342 B
Python
from .__init__ import *
|
|
|
|
|
|
def volumeCylinder(maxRadius=20, maxHeight=50, unit='m'):
|
|
a = random.randint(1, maxHeight)
|
|
b = random.randint(1, maxRadius)
|
|
|
|
problem = f"Volume of cylinder with height = {a}{unit} and radius = {b}{unit} is"
|
|
ans = int(math.pi * b * b * a)
|
|
solution = f"{ans} {unit}^3"
|
|
return problem, solution
|