5. 用Python编程,假设一年期定期利率为3.25%,计算一下需要过多少年,一万元的一年定期存款连本带息能翻番?
#python 3.6#cqdjy #http://blog.csdn.net/caimouse/article/details/51749579#save = 10000for x in range(1, 100): if save * (1 + 0.0325) ** x >= 20000: print(x, '年以后,存款会翻番!') break;结果输出如下:
22 年以后,存款会翻番!
深入浅出Matplotlib
https://edu.csdn.net/course/detail/6859
深入浅出Numpy
http://edu.csdn.net/course/detail/6149
Python游戏开发入门 http://edu.csdn.net/course/detail/5690
你也能动手修改C编译器