摘要: import mathf = 29.4print(math.ceil(f)) #向上取整print(math.floor(f)) #向下取整print(round(f)) #四舍五入输出302929 阅读全文
posted @ 2018-12-29 21:26 jjjjjjjjjjjj 阅读(125) 评论(0) 推荐(0) 编辑
摘要: from functools import reducedef func (x,y): return x+yprint(reduce(func,range(101)))print(reduce(lambda x, y: x+y, range(101))) 阅读全文
posted @ 2018-12-29 19:51 jjjjjjjjjjjj 阅读(176) 评论(0) 推荐(0) 编辑