import sys class Stats: def __init__(self, sequence): # sequence of numbers we will process # convert all items to floats for numerical processing self.sequence = [float(item) for item in sequence] def sum(self): if len(self.sequence) < 1: return Non
'''Created on 2018年10月28日递归函数示例:阶乘'''def my_fun_example1(n): ''' 非递归函数求阶乘示例 ''' result = n for i in range(1,n): result *= i return resultdef my_fun_example2(n): ''' 递归函数求阶乘示例 ''' if n == 1: return 1 else