900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > python预测你的小孩身高_Python 孩子身高预测

python预测你的小孩身高_Python 孩子身高预测

时间:2019-03-18 18:27:48

相关推荐

python预测你的小孩身高_Python 孩子身高预测

Python 孩子身高预测:

源代码:

# 创建死循环,直至 用户自行 选择 退出

while True :

# 分割线

print(**60)

print(**10,欢迎来到 孩子身高 预测系统,**10)

# 功能选择

print(\ 1、预测查询)

print(\ 2、退出系统)

menus_select = input(请选择功能( 1、2 ):)

# 对输入的内容进行判断

if menus_select == 1 or menus_select == 预测查询 :

father_height = float(input(请输入父亲身高:))

mother_height = float(input(请输入母亲身高:))

children_gender = input(请输入孩子性别(女 或 男):)

if children_gender == 男:

# 固定的计算公式

boys_height_min = (45.99) + ((0.78 * (father_height + mother_height)) / 2) - (5.29)

boys_height_max = (45.99) + ((0.78 * (father_height + mother_height)) / 2) + (5.29)

boys_height_result = f孩子的身高预估在

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。