restructure base

This commit is contained in:
lukew3
2020-10-18 23:48:13 -04:00
parent 5d4293e4da
commit 0e63b4ee11
11 changed files with 142 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
from .__init__ import *
def profitLossPercentFunc(maxCP = 1000, maxSP = 1000):
cP = random.randint(1, maxCP)
sP = random.randint(1, maxSP)
diff = abs(sP-cP)
if (sP-cP >= 0):
profitOrLoss = "Profit"
else:
profitOrLoss = "Loss"
percent = diff/cP * 100
problem = f"{profitOrLoss} percent when CP = {cP} and SP = {sP} is: "
solution = percent