money=10000 year=0 while money<=20000: year+=1 money=money*(1+0.0325) print("%s年后,存款可以翻一番"%year)
python:假设一年期定期利率为3.25%,计算一下需要过多少年,一万元的一年定期存款连本带息能翻番?
最新推荐文章于 2022-12-18 11:46:22 发布
money=10000 year=0 while money<=20000: year+=1 money=money*(1+0.0325) print("%s年后,存款可以翻一番"%year)