From 65d5902d908ff4587bad36e3382b9f1329b9a9bb Mon Sep 17 00:00:00 2001 From: lukew3 Date: Fri, 20 Nov 2020 20:41:43 -0500 Subject: [PATCH] genList sort and add requirement imports to main package --- mathgenerator/__init__.py | 8 ++++++++ test.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mathgenerator/__init__.py b/mathgenerator/__init__.py index 45ca62f..53ea76f 100644 --- a/mathgenerator/__init__.py +++ b/mathgenerator/__init__.py @@ -1,5 +1,11 @@ import sys import traceback + +import random +import sympy +import numpy +import scipy + genList = [] @@ -29,4 +35,6 @@ class Generator: def getGenList(): correctedList = genList[-1:] + genList[:-1] + #Orders list by id + correctedList.sort() return correctedList diff --git a/test.py b/test.py index 02dd930..e4388cb 100644 --- a/test.py +++ b/test.py @@ -10,7 +10,7 @@ for item in list: print(item[2]) # print(mathgen.getGenList()) -print(mathgen.genById(111)) +print(mathgen.genById(1)) #Make a pdf with 10 problems of generator id 1 # mathgen.makePdf(0, 10)