Discuss / Python / 文档测试,打卡

文档测试,打卡

Topic source

人玉匆花

#1 Created at ... [Delete] [Delete and Lock User]

def fact(n):

    '''

    Calculate 1*2*...*n

    >>> fact(1)

    1

    >>> fact(10)

    3628800

    >>> fact(-1)

    Traceback (most recent call last):

        ...

    ValueError

    '''


  • 1

Reply