mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
🤖 made makeReadme.py fully automated
This commit is contained in:
@@ -40,11 +40,12 @@ def matrixMultiplicationFuncHelper(inp):
|
||||
m = len(inp)
|
||||
n = len(inp[0])
|
||||
|
||||
string = ""
|
||||
string = "[["
|
||||
for i in range(m):
|
||||
for j in range(n):
|
||||
string += f"{inp[i][j]: 6d}"
|
||||
string += " "
|
||||
string += "\n"
|
||||
string += ", "if j < n-1 else ""
|
||||
string += "]\n [" if i < m-1 else ""
|
||||
string += "]]"
|
||||
|
||||
return string
|
||||
@@ -4,7 +4,7 @@ from .__init__ import *
|
||||
def moduloFunc(maxRes=99, maxModulo=99):
|
||||
a = random.randint(0, maxModulo)
|
||||
b = random.randint(0, min(maxRes, maxModulo))
|
||||
c = a % b
|
||||
c = a % b if b != 0 else 0
|
||||
|
||||
problem = str(a) + "%" + str(b) + "="
|
||||
solution = str(c)
|
||||
|
||||
@@ -12,3 +12,5 @@ def profitLossPercentFunc(maxCP = 1000, maxSP = 1000):
|
||||
percent = diff/cP * 100
|
||||
problem = f"{profitOrLoss} percent when CP = {cP} and SP = {sP} is: "
|
||||
solution = percent
|
||||
|
||||
return problem, solution
|
||||
Reference in New Issue
Block a user