diff --git a/pi.py b/pi.py index a84e760..b3445d8 100644 --- a/pi.py +++ b/pi.py @@ -4,4 +4,12 @@ """ # TODO +cleantext = text.replace(",","") +cleantext = cleantext.replace(".","") +words = cleantext.split() +wordscount=list(map(len,list(words))) +result=''.join(map(str,wordscount)) +print(result) + + diff --git a/quadratic_formula.py b/quadratic_formula.py index 96a37e7..a0d014c 100644 --- a/quadratic_formula.py +++ b/quadratic_formula.py @@ -1,9 +1,11 @@ a = 1 -b = -6 -c = 9 +b = 0 +c = 1 # TODO -x1 = ... -x2 = ... - -print(x1, x2) +x1 = (-b-(b**2-4*a*c)**0.5)/(2*a) +x2 = (-b+(b**2-4*a*c)**0.5)/(2*a) +if x1 != x2: + print(x1,x2) +else: + print(x1)