Merge branch 'master' into feature/binomial-distribution

This commit is contained in:
Luke Weiler
2020-10-26 13:14:54 -04:00
committed by GitHub
5 changed files with 134 additions and 114 deletions

View File

@@ -110,5 +110,6 @@ from .minutes_to_hours import *
from .decimal_to_bcd import *
from .circumference import *
from .combine_like_terms import *
from .signum_function import *
from .conditional_probability import *
from .binomial_distribution import *

View File

@@ -24,4 +24,4 @@ def conditionalProbFunc():
conditional_probability = Generator("Conditional Probability",
105, "P(A|+)=", "c", conditionalProbFunc)
107, "P(A|+)=", "c", conditionalProbFunc)

View File

@@ -0,0 +1,19 @@
from .__init__ import *
import random
def signumFunc(min=-999, max=999):
a = random.randint(min, max)
b = 0
if (a > 0):
b = 1
if (a < 0):
b = -1
problem = "signum of " + str(a) + " is " + "="
solution = str(b)
return problem, solution
signum_function = Generator("signum function", 106,
"signum function of a is", "b",
signumFunc)