''' 题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半; 再落下,求它在第10次落地时,共经过多少米?第10次反弹多高? ''' s = 100 l = 0 for i in range(1,11): a=s/(2**i) print(a) l = l + a*2 if i ==10: b = a n = l - b +100 print(n)
posted on 2019-12-19 21:39 libra-gyf 阅读(119) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 libra-gyf Powered by .NET 9.0 on Kubernetes