admin管理员组

文章数量:1794759

用python计算你的钱放在银行里多少年才能翻倍

用python计算你的钱放在银行里多少年才能翻倍

money = float(input("please input you want to double the money:")) double_money = money * 2 year = 0 interest = float(input("please input interest:")) interest_money = 0 while money <= double_money: interest_money = money * interest money += interest_money year += 1 print(f"generate interest {interest_money} in year {year}") print(f"your money need {year} year to double it...")

本文标签: 放在的钱翻倍算你里多