Discuss / Python / 作业

作业

Topic source

def product(*numbers):

    sum = 1

    if len(numbers) <= 0:

        raise TypeError() 

    else: 

        for l in numbers:

            sum = sum*l

        return sum


  • 1

Reply