黑馬程序員python教程,8天python從入門到精通,學python看這套就

p26練習
股票計算小程序
name = "傳智播客"
stock_price = 19.99
stock_code = "003032"
print(f"公司名:{name},股票代碼:{stock_code},當前股價:{stock_price}")
storck_price_daily_growth_factor = 1.2
growth_days = 7
dest =19.99*1.2**7
print("19.99*1.2**7",19.99*1.2**7)
slt = 71.62778419199998
print("股價達到了:%.2f" %(slt))
stll = 71.62778419199998
print("每日增長系數(shù):%.2f,經過:%d天的增長后,股價達到了:%.2f" %(storck_price_daily_growth_factor,growth_days,stll))
標簽: