name = "大壮农场" stock_price = 221 stock_code = 115899 stock_price_daily_growth_factor = 1.2 growth_days = 15 # 计算经过growth_days天的增长后,股价达到了多少钱? # message = f"我们公司叫做{name},股票代码为{stock_code},当前股票价格为{stock_price}元," \ # "经过{growth_days}天后,公司股价达到了{stock_price * (stock_price_daily_growth_factor ** growth_days)}元" # print(message) print(f'我们公司叫做{name},股票代码为{stock_code},当前股票价格为{stock_price}元,') print('经过%d天后,公司股价达到%.2f元'% (growth_days,stock_price * (stock_price_daily_growth_factor ** growth_days)))