I am trying to make a module but not sure what exactly they are. I will post what the requirements of it are.
REQUIREMENTS Make a module called 'funct' that holds the following information -
def total(val) - returns sum of all # in the list 'val'.
def sub(val) - returns the difference of all # in the list 'val'.
def times(val) - returns the product of all # in the list 'val'.
def div(val) - returns the result of dividing all # in the list 'val'. If first # is 0, then the result is 0. If any other # are 0, use sys.exit to stop it & display 'invalid list.'
Here is what I'm thinking it is supposed to be like:
import funct
funct.total([1, 2, 3, 4])
funct.sub([1, 2, 3, 4])
funct.times([1, 2, 3, 4])
funct.div([1, 2, 3, 4])