mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
Organized readme and added imports to some generators
This commit is contained in:
@@ -21,10 +21,10 @@ class Generator:
|
||||
text) = traceback.extract_stack()[-2]
|
||||
funcname = filename[filename.rfind('/'):].strip()
|
||||
funcname = funcname[1:-3]
|
||||
groupname = filename[:filename.rfind('/')].strip()
|
||||
groupname = groupname[groupname.rfind('/'):].strip()
|
||||
groupname = groupname[1:]
|
||||
genList.append([id, title, self, funcname, groupname])
|
||||
subjectname = filename[:filename.rfind('/')].strip()
|
||||
subjectname = subjectname[subjectname.rfind('/'):].strip()
|
||||
subjectname = subjectname[1:]
|
||||
genList.append([id, title, self, funcname, subjectname])
|
||||
|
||||
def __str__(self):
|
||||
return str(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from .__init__ import *
|
||||
|
||||
import fractions
|
||||
|
||||
def intersectionOfTwoLinesFunc(minM=-10,
|
||||
maxM=10,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
def quadraticEquation(maxVal=100):
|
||||
a = random.randint(1, maxVal)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
def nthFibonacciNumberFunc(maxN=100):
|
||||
golden_ratio = (1 + math.sqrt(5)) / 2
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def arclengthFunc(maxRadius=49, maxAngle=359):
|
||||
Radius = random.randint(1, maxRadius)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
# Handles degrees in quadrant one
|
||||
def basicTrigonometryFunc(angles=[0, 30, 45, 60, 90],
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def complexToPolarFunc(minRealImaginaryNum=-20, maxRealImaginaryNum=20):
|
||||
num = complex(random.randint(minRealImaginaryNum, maxRealImaginaryNum),
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def decimalToRomanNumeralsFunc(maxDecimal=4000):
|
||||
x = random.randint(0, maxDecimal)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def euclidianNormFunc(maxEltAmt=20):
|
||||
vec = [
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def surdsComparisonFunc(maxValue=100, maxRoot=10):
|
||||
radicand1, radicand2 = tuple(random.sample(range(1, maxValue), 2))
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def confidenceIntervalFunc():
|
||||
n = random.randint(20, 40)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from .__init__ import *
|
||||
|
||||
import math
|
||||
|
||||
|
||||
def permutationFunc(maxlength=20):
|
||||
a = random.randint(10, maxlength)
|
||||
|
||||
Reference in New Issue
Block a user