# To use, paste at bottom of mathgen.py code, change line variable and remove all table rows in README.md except for the top 2 and run mathgen.py # NOTE: not anymore. but still leaving this comment in. from mathgenerator.mathgen import * wList = getGenList() lines = [] with open('mathgenerator/mathgen.py', 'r') as f: lines = f.readlines() allRows = [] # get the first line of the functions in mathgen.py line = lines.index('# Funcs_start - DO NOT REMOVE!\n') + 1 for item in wList: myGen = item[2] # NOTE: renamed 'sol' to 'solu' to make it look nicer prob, solu = myGen() prob = str(prob).rstrip("\n") solu = str(solu).rstrip("\n") # edge case for matrixMultiplication if item[0] == 46: print(prob) prob = prob.replace("[[", "
| ") prob = prob.replace("[", " | |
| ") prob = prob.replace(", ", " | ") prob = prob.replace("]]\n", " |