Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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()