diff --git a/mathgenerator/__pycache__/__init__.cpython-37.pyc b/mathgenerator/__pycache__/__init__.cpython-37.pyc new file mode 100644 index 0000000..893336f Binary files /dev/null and b/mathgenerator/__pycache__/__init__.cpython-37.pyc differ diff --git a/mathgenerator/__pycache__/mathgen.cpython-37.pyc b/mathgenerator/__pycache__/mathgen.cpython-37.pyc new file mode 100644 index 0000000..418e0a5 Binary files /dev/null and b/mathgenerator/__pycache__/mathgen.cpython-37.pyc differ diff --git a/mathgenerator/mathgen.py b/mathgenerator/mathgen.py index 232b2ea..2454921 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -605,6 +605,31 @@ def vectorCrossFunc(minVal=-20, maxVal=20): a[0]*b[1] - a[1]*b[0]] return str(a) + " X " + str(b) + " = ", str(c) +def compareFractionsFunc(maxVal=10): + a = random.randint(1, maxVal) + b = random.randint(1, maxVal) + c = random.randint(1, maxVal) + d = random.randint(1, maxVal) + + while (a == b): + b = random.randint(1, maxVal) + while (c == d): + d = random.randint(1, maxVal) + + first=a/b + second=c/d + + if(first>second): + solution=">" + elif(first/