代码1
faHeight=input("请输入父亲的身高:")
moHeight=input("请输入母亲的身高:")
sex=(input("请输入性别:"))
sports=(input("是否喜欢运:"))
diet=(input("是否有良好的饮食习惯:"))
Height=0
if sex=="M":
Height=(int(faHeight)+int(moHeight))*0.54
else:
Height=(int(faHeight)*0.923+int(moHeight))/2
if sports=="Y":
Height=Height*(1+0.02)
if diet=="Y":
Height=Height*(1+0.15)
print("{}".format(Height))
代码2
name="李瑞沂"
print("我叫:%s"% name)
#定义小数 price、weight、money,输出 苹果单价 9.00 元/斤,购买了 5.00 斤,需要支付 45.00 元
'''
money=weight*price
price=input("请输入苹果单价:")
weight=input("请输入苹果重量:")
print("需支付: 元%d"%s)
'''
#定义一个小数 scale,输出 数据比例是 10.00%
'''
代码3
name=input("公司名称:")
name1=input("姓名:")
phone_number=input("电话:")
'''
price_str=input("请输入苹果单价:")
weight_str=input("请输入苹果重量:")
#look out字符串不可进行加减乘除,需要转换类型
price=float(price_str)
weight=float(weight_str)
money=weight*price
print("money")
```