mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Fix issue #342, divide by 0
This commit is contained in:
@@ -3,7 +3,7 @@ from .__init__ import *
|
|||||||
|
|
||||||
def complexDivisionFunc(maxRes=99, maxDivid=99):
|
def complexDivisionFunc(maxRes=99, maxDivid=99):
|
||||||
a = random.randint(0, maxDivid)
|
a = random.randint(0, maxDivid)
|
||||||
b = random.randint(0, min(maxRes, maxDivid))
|
b = random.randint(1, min(maxRes, maxDivid))
|
||||||
c = a / b
|
c = a / b
|
||||||
c = round(c, 2)
|
c = round(c, 2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user