本人刚学python,这个要用while loop循环,把a1的值从0.08变成0.10和0.12,请问怎么写能一次性输出三个fv的结果
pv = 200000
a1 = 0.08
number_of_years = 10
fv = pv*(1+a1/2)**(number_of_years*2)
print(fv)
pv = 200000
a1 = 0.10
number_of_years = 10
fv = pv*(1+a1/2)**(number_of_years*2)
print(fv)
pv = 200000
a1 = 0.12
number_of_years = 10
fv = pv*(1+a1/2)**(number_of_years*2)
print(fv)