mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
genList sort and add requirement imports to main package
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
import random
|
||||||
|
import sympy
|
||||||
|
import numpy
|
||||||
|
import scipy
|
||||||
|
|
||||||
genList = []
|
genList = []
|
||||||
|
|
||||||
|
|
||||||
@@ -29,4 +35,6 @@ class Generator:
|
|||||||
|
|
||||||
def getGenList():
|
def getGenList():
|
||||||
correctedList = genList[-1:] + genList[:-1]
|
correctedList = genList[-1:] + genList[:-1]
|
||||||
|
#Orders list by id
|
||||||
|
correctedList.sort()
|
||||||
return correctedList
|
return correctedList
|
||||||
|
|||||||
2
test.py
2
test.py
@@ -10,7 +10,7 @@ for item in list:
|
|||||||
print(item[2])
|
print(item[2])
|
||||||
|
|
||||||
# print(mathgen.getGenList())
|
# print(mathgen.getGenList())
|
||||||
print(mathgen.genById(111))
|
print(mathgen.genById(1))
|
||||||
|
|
||||||
#Make a pdf with 10 problems of generator id 1
|
#Make a pdf with 10 problems of generator id 1
|
||||||
# mathgen.makePdf(0, 10)
|
# mathgen.makePdf(0, 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user