# -*- coding: utf-8 -*-
def product(*x):
if not x:
raise TypeError('Input is None')
product=1
for i in x:
if not isinstance(i,(int,float)):
raise TypeError('bad perand type')
product=product*i
return product
Sign in to make a reply
用户6776087169
# -*- coding: utf-8 -*-
def product(*x):
if not x:
raise TypeError('Input is None')
product=1
for i in x:
if not isinstance(i,(int,float)):
raise TypeError('bad perand type')
product=product*i
return product