high=100n=10high|all=0|第n次着陆的长度high|each=0|每次着陆的高度,defball|lands(n):当球第一次着陆时,全局high|all,high|each,high|,如果n==0:high_35;each=highhigh_35;all=high_35;each#print(“1”,high_35;each,high_35;all)returnhigh_35;each#从球的第n次落地开始向前推高35;each=high*(1/2)**nprint(u)“球在%d反弹时的高度为:%。2f“%(n,high)each))highall=higheach*2print(”2“,higheach,higheach)balllands(n-1)balllands(n)print(u)”球落下%d次,共%d次。2f米。“%(n,全部高))