0
assert 문을 사용하여 함수의 인수를 확인할 수있는 방법이 있습니까?파이썬에서 assert 문에 의한 인수 존재
def fractional(x) :
assert x==None, "argument missing" <---- is it possible here to check?
assert type(x) == int, 'x must be integer'
assert x > 0 , ' x must be positive '
output = 1
for i in range (1 , int(x)+1) :
output = output*i
assert output > 0 , 'output must be positive'
return output
y=3
fractional() <----- argument missing