def get_height(n): if n==1: eturn 150 return 100+sum([200*pow(0.5,i) for i in range(1,n)])+100*pow(0.5,n) for i in range(1,5): print get_height(i) 150 225.0 262.5 281.25结果如上, 递归法求解如下:def get_height(n): if n==1: eturn 150 return get_height(n-1)+100*po…