From 53b07cd4eaf1133719584b1bc1233f731fb0406f Mon Sep 17 00:00:00 2001 From: Marco Mambelli Date: Tue, 4 Jun 2024 10:25:10 -0500 Subject: [PATCH] Added function dividing elements --- src/planetsmath/functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/planetsmath/functions.py b/src/planetsmath/functions.py index 36f9392..5b77524 100644 --- a/src/planetsmath/functions.py +++ b/src/planetsmath/functions.py @@ -39,6 +39,15 @@ def multiply_by_2(list): def division_function(list): + """ + A function that takes a list and returns 1/the product of the elements + + Args: + list(list): list of numbers + + Return: + float: 1/the product + """ division = 1.0 for item in list: division /= item