mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Lint fixes
This commit is contained in:
@@ -21,7 +21,7 @@ def compareFractionsFunc(maxVal=10, style='raw'):
|
||||
solution = "<"
|
||||
else:
|
||||
solution = "="
|
||||
|
||||
|
||||
if style == 'latex':
|
||||
problem = f"Which symbol represents the comparison between \\(\\frac{{{a}}}{{{b}}}\\) and \\(\\frac{{{c}}}{{{d}}}\\)?"
|
||||
else:
|
||||
|
||||
@@ -7,7 +7,7 @@ def exponentiationFunc(maxBase=20, maxExpo=10, style='raw'):
|
||||
|
||||
if style == 'latex':
|
||||
problem = f"\\({base}^{{{expo}}}\\)"
|
||||
solution = "\\(" + str(base**expo) + "\\)"
|
||||
solution = "\\(" + str(base**expo) + "\\)"
|
||||
else:
|
||||
problem = f"{base}^{expo} ="
|
||||
solution = str(base**expo)
|
||||
|
||||
@@ -5,7 +5,7 @@ def isprime(max_a=100):
|
||||
a = random.randint(2, max_a)
|
||||
problem = f"Is {a} prime?"
|
||||
if a == 2:
|
||||
solution = "Yes"
|
||||
solution = "Yes"
|
||||
return (problem, solution)
|
||||
if a % 2 == 0:
|
||||
solution = "No"
|
||||
|
||||
@@ -6,7 +6,7 @@ def powerOfPowersFunc(maxBase=50, maxPower=10, style='raw'):
|
||||
power1 = random.randint(1, maxPower)
|
||||
power2 = random.randint(1, maxPower)
|
||||
step = power1 * power2
|
||||
|
||||
|
||||
if style == 'latex':
|
||||
problem = "Simplify \\(" + str(base) + "^{" + str(power1) + "^{" + str(power2) + "}}\\)"
|
||||
solution = f"\\({base}^{{{step}}}\\)"
|
||||
|
||||
Reference in New Issue
Block a user