黑马程序员python教程,8天python从入门到精通,学python看这套就

P27
name = "微软" #公司名称
stock_price = 6 #股票价格
sp = stock_price
stock_code = "3040411" #股票代码
stock_price_daliy_growth_factor = 1.2 # 股票每日增长系数,浮点数类型
spdgf = stock_price_daliy_growth_factor
growth_days = 5 # 增长天数
gd = growth_days
print(f"公司:{name}, 股票代码:{stock_code}, 当前股价:{sp}", "每日增长系数:%s" % spdgf, "经过%s天增长后,股价达到了:%.2f" % (gd,sp*spdgf**gd))