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 bd22657..6f6a5fe 100644 --- a/mathgenerator/mathgen.py +++ b/mathgenerator/mathgen.py @@ -464,6 +464,31 @@ def commonFactorsFunc(maxVal=100): problem = f"Common Factors of {a} and {b} = " solution = arr return problem, solution +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/