mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Update mathgen.py
This commit is contained in:
32
mathgen.py
32
mathgen.py
@@ -13,20 +13,20 @@
|
|||||||
# def __call__(self, **kwargs):
|
# def __call__(self, **kwargs):
|
||||||
# return self.func(**kwargs)
|
# return self.func(**kwargs)
|
||||||
|
|
||||||
# def isprime(max_a =100):
|
def isprime(max_a =100):
|
||||||
# a =random.randint(2,max_a)
|
a =random.randint(2,max_a)
|
||||||
# problem =a
|
problem =a
|
||||||
# if a == 2:
|
if a == 2:
|
||||||
# solution = True
|
solution = True
|
||||||
# return problem,solution
|
return problem,solution
|
||||||
# if a % 2 == 0:
|
if a % 2 == 0:
|
||||||
# solution = False
|
solution = False
|
||||||
# return problem,solution
|
return problem,solution
|
||||||
# for i in range(3, a // 2 + 1, 2):
|
for i in range(3, a // 2 + 1, 2):
|
||||||
# if a % i == 0:
|
if a % i == 0:
|
||||||
# solution = False
|
solution = False
|
||||||
# return problem, solution
|
return problem, solution
|
||||||
# solution = True
|
solution = True
|
||||||
# return problem, solution
|
return problem, solution
|
||||||
|
|
||||||
is_prime = Generator("isprime", 61, "a any positive integer", "True/False", isprime())
|
is_prime = Generator("isprime", 74, "a any positive integer", "True/False", isprime())
|
||||||
|
|||||||
Reference in New Issue
Block a user