From 246d913ffd033f819f0ac454c2b68704bbe9036d Mon Sep 17 00:00:00 2001 From: Jaso Salgado Date: Fri, 19 Jun 2020 14:41:03 -0500 Subject: [PATCH] Challenge solved --- challenge.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/challenge.py b/challenge.py index 2653d7e..3205d01 100644 --- a/challenge.py +++ b/challenge.py @@ -3,7 +3,10 @@ def make_division_by(n): of an x number by n """ # You have to code here! - pass + def division(x): + assert type(x) == int + return x / n + return division def run(): @@ -23,6 +26,7 @@ def run(): class ClosureSuite(unittest.TestCase): def test_closure_make_division_by(self): # Make the closure test here - pass + division_by_two = make_division_by(2) + self.assertEqual(5, division_by_two(10)) run()