举个栗子
price=float(input("请输入苹果单价"))
weight=float(input(“请输入重量”))
money=float(price*weigjt)
print(“苹果单价为%f,重量为%f,总价%f”%(price,weigjt,money))
举个栗子
price=float(input("请输入苹果单价"))
weight=float(input(“请输入重量”))
money=float(price*weigjt)
print(“苹果单价为%f,重量为%f,总价%f”%(price,weigjt,money))
本文标题:python格式化输出
本文链接:https://www.haomeiwen.com/subject/rtjhyftx.html
网友评论