mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
16 lines
266 B
Python
16 lines
266 B
Python
from .__init__ import *
|
|
|
|
|
|
def factorialFunc(maxInput=6):
|
|
a = random.randint(0, maxInput)
|
|
n = a
|
|
|
|
problem = str(a) + "! = "
|
|
b = 1
|
|
|
|
while a != 1 and n > 0:
|
|
b *= n
|
|
n -= 1
|
|
solution = str(b)
|
|
return problem, solution
|