From a73fb575bf5309b5a75978e06eca314149ce3740 Mon Sep 17 00:00:00 2001 From: pachom Date: Sun, 9 Aug 2020 19:18:12 -0500 Subject: [PATCH] challenge-06 closures commit added pachom --- challenge.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/challenge.py b/challenge.py index 2653d7e..dfbaafe 100644 --- a/challenge.py +++ b/challenge.py @@ -2,8 +2,10 @@ def make_division_by(n): """This closure returns a function that returns the division of an x number by n """ - # You have to code here! - pass + def division(x): + assert n != 0, 'Division by 0 is not valid' + return x / n + return division def run():