网站维护的主要工作,外国手表网站,php网站链接支付宝,购买域名和空间示例一#xff1a;
题目#xff1a;
利用输出语句输出下列语句内容#xff1a;公司#xff1a;
ikun股票,股票代码#xff1a;001314 ,当前股价#xff1a;2.5 #xff0c;每日增长系数:1.2350 #xff0c;经过增长7天后#xff0c;股价达到了#xff1a;10.95490…示例一
题目
利用输出语句输出下列语句内容公司
ikun股票,股票代码001314 ,当前股价2.5 每日增长系数:1.2350 经过增长7天后股价达到了10.954907424。
name ikun股票
#股票当前价格
stock_price 2.5
#股票编号
stock_code 001314
#股票每日增长系数
stock_price_daily_factor 1.235
#增长天数
growth_days 7
#用一句话输出
print(公司,name,股票代码%s%stock_code,f,当前股价{2.5},每日增长系数:%.4f%stock_price_daily_factor,f经过增长{growth_days}天后股价达到了%.9f%(stock_price*stock_price_daily_factor**growth_days)。)
#第一行f内容{变量}输出第二行用 % 号输出
print(f公司{name},股票代码{stock_code},当前股价{stock_price})
print(股票每日增长系数.%4f,增长%d天后,股票的价格为:%.9f%(stock_price_daily_factor,growth_days,stock_price*stock_price_daily_factor**growth_days))输出结果
公司 ikun股票,股票代码001314 ,当前股价2.5 每日增长系数:1.2350 经过增长7天后股价达到了10.954907424。
公司ikun股票,股票代码001314,当前股价2.5
股票每日增长系数.1.235000,增长7天后,股票的价格为:10.954907424