Lint fixes

This commit is contained in:
lukew3
2020-12-17 22:22:18 -05:00
parent 42dd6c368c
commit 05f8bb712a
4 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ def compareFractionsFunc(maxVal=10, style='raw'):
solution = "<" solution = "<"
else: else:
solution = "=" solution = "="
if style == 'latex': if style == 'latex':
problem = f"Which symbol represents the comparison between \\(\\frac{{{a}}}{{{b}}}\\) and \\(\\frac{{{c}}}{{{d}}}\\)?" problem = f"Which symbol represents the comparison between \\(\\frac{{{a}}}{{{b}}}\\) and \\(\\frac{{{c}}}{{{d}}}\\)?"
else: else:

View File

@@ -7,7 +7,7 @@ def exponentiationFunc(maxBase=20, maxExpo=10, style='raw'):
if style == 'latex': if style == 'latex':
problem = f"\\({base}^{{{expo}}}\\)" problem = f"\\({base}^{{{expo}}}\\)"
solution = "\\(" + str(base**expo) + "\\)" solution = "\\(" + str(base**expo) + "\\)"
else: else:
problem = f"{base}^{expo} =" problem = f"{base}^{expo} ="
solution = str(base**expo) solution = str(base**expo)

View File

@@ -5,7 +5,7 @@ def isprime(max_a=100):
a = random.randint(2, max_a) a = random.randint(2, max_a)
problem = f"Is {a} prime?" problem = f"Is {a} prime?"
if a == 2: if a == 2:
solution = "Yes" solution = "Yes"
return (problem, solution) return (problem, solution)
if a % 2 == 0: if a % 2 == 0:
solution = "No" solution = "No"

View File

@@ -6,7 +6,7 @@ def powerOfPowersFunc(maxBase=50, maxPower=10, style='raw'):
power1 = random.randint(1, maxPower) power1 = random.randint(1, maxPower)
power2 = random.randint(1, maxPower) power2 = random.randint(1, maxPower)
step = power1 * power2 step = power1 * power2
if style == 'latex': if style == 'latex':
problem = "Simplify \\(" + str(base) + "^{" + str(power1) + "^{" + str(power2) + "}}\\)" problem = "Simplify \\(" + str(base) + "^{" + str(power1) + "^{" + str(power2) + "}}\\)"
solution = f"\\({base}^{{{step}}}\\)" solution = f"\\({base}^{{{step}}}\\)"