Python 程序:计算最终收益 - 本金、年利率和年数
def getValue(b,r,n): 'v=b*(1+r)*n' return b * (1 + r) * n
nb=eval(input('输入本金')) nr=eval(input('输入年利率')) ny=eval(input('输入年数'))
result = getValue(nb, nr/100, ny)
print('最终收益为:{:.2f}'.format(result))
原文地址: https://www.cveoy.top/t/topic/o0eM 著作权归作者所有。请勿转载和采集!