def __init__(self): self.type = Types.algebra_negative_numbers self.complexity = Complexity.Basic self.var = random.sample(['x', 'y', 'z', 't', 'a', 'b', 'c'], 1)[0] rc = get_unsorted_n_distinct(Question6.coeff, 3) self.q = r'${c1} - ({c2} - {v}) = {c3}$ '.format(c1=rc[0], v =self.var, c2=rc[1], c3=rc[2]) self.res = r'{r1}'.format(r1=(rc[2]-rc[0]+rc[1]))
def __init__(self): self.type = Types.fraction_equation self.complexity = Complexity.Basic ratio1, ratio2 = get_unsorted_n_distinct(random_fractions,2) res = Fraction(ratio1.numerator*ratio2.denominator, ratio1.denominator*ratio2.numerator) self.q = r'$\dfrac{{{0}}}{{{1}}} = \dfrac{{{2}X}}{{{3}}} $, What is X' \ .format(ratio1.numerator, ratio1.denominator, ratio2.numerator, ratio2.denominator) self.a = r'$\dfrac{{{0}}}{{{1}}}$'.format(res.numerator, res.denominator)
def __init__(self): self.type = Types.Simplfy_expression self.complexity = Complexity.Basic self.var1, self.var2 = get_two_distinct(['x', 'y', 'z', 't', 'a', 'b', 'c']) rc = get_unsorted_n_distinct(Question1.coeff, 6) cr = add_plus_sign(rc) # adding + for positive values for representation, keeping them separate from their actual value above. # note we are using first coefficient as is, regardless of its sign, only the positives are marked with + after first one self.q = r'${c1}{v1}{c6}{c2}{v2}{c5}{c3}{v1}{c4}{v2}$'.format(c1=cr[0], v1=self.var1, c2=cr[1], v2=self.var2, c3=cr[2], c4=cr[3], c5=cr[4], c6=cr[5]) rx = add_plus_sign([rc[0]+rc[2], rc[1]+rc[3], rc[4]+rc[5]]) self.res = r'{r1}{v1} {r2}{v2} {r3}'.format(r1=rx[0], v1=self.var1, r2=rx[1], v2=self.var2, r3=rx[2])
def __init__(self): self.type = Types.fraction_equation self.complexity = Complexity.Basic ratio1, ratio2, ratio3 = get_unsorted_n_distinct(simple_fractions, 3) res = -ratio2 / (ratio1 - ratio3) self.q = r'$\dfrac{{{0}X}}{{{1}}} + \dfrac{{{2}}}{{{3}}} = \dfrac{{{4}X}}{{{5}}}$, What is X' \ .format(ratio1.numerator, ratio1.denominator, ratio2.numerator, ratio2.denominator, ratio3.numerator, ratio3.denominator, ) self.a = r'$\dfrac{{{0}}}{{{1}}}$'.format(res.numerator, res.denominator)
def __init__(self): self.type = Types.fraction_unknown self.complexity = Complexity.Basic ratio1, ratio2 = get_unsorted_n_distinct(random_fractions, 2) c1, c2 = random.sample([2, 3, 4, 5, 6], 2) res = ratio1 + ratio2 res = -Fraction(res.numerator * c2, res.denominator * c1) self.q = r'$\dfrac{{{0}}}{{{1}}}$ + $\dfrac{{{2}}}{{{3}}}$ + $\dfrac{{{4}X}}{{{5}}} $ = 0, What is X' \ .format(ratio1.numerator, ratio1.denominator, ratio2.numerator, ratio2.denominator, c1, c2) self.a = r'$\dfrac{{{0}}}{{{1}}}$'.format(res.numerator, res.denominator)
def __init__(self): self.type = Types.Fraction_compare self.complexity = Complexity.Moderate self.ratio1, self.ratio2 = get_unsorted_n_distinct(random_fractions, 2) self.res = (self.ratio1 - self.ratio2) > 0
def __init__(self): self.type = [Types.Fraction_compare, Types.sat_arithmetic] self.complexity = Complexity.Basic self.ratio1, self.ratio2 = get_unsorted_n_distinct(simple_fractions,2) self.res = (self.ratio1 - self.ratio2 ) > 0