print("How old are you?", end=' ') # How old are you? 45
age = input()
print("How tall are you?", end='') # How tall are you? 173
height = input()
print("How much do you weight?", end='') # How much do you weight? 80
weight = input()
print(f"So, you're {age} old, {height} tall and {weight} heavy.") # so,you're 45 old, 173 tall and 80 weight.
"""
换一种写法:
age = input("How old are you?",) # 强迫症犯了,为什么有下划线,为什么抄一遍就没有
age = input("How old are you?",)
height = input("How tall are you?",)
weight = input("How much do you weight?",)
print(f"So, you're {age} old, {height} tall and {weight} heavy.")
"""
"""
input()
1、有问有答,终端区输入
2、函数好用,赋值第一,必须赋值
3、input的提示信息也是输出
4、输入类型必为str,数字需要转换类型int or float
"""
print(age+height+weight) # 所以,输入42、160、80运行结果为4216080,是字符串相加
print(float(age)+float(height)+float(weight)) # 这个就没有问题了
print("How old are you?", end=' ') # How old are you? 45
age = input()
print("How tall are you?", end='') # How tall are you? 173
height = input()
print("How much do you weight?", end='') # How much do you weight? 80
weight = input()
print(f"So, you're {age} old, {height} tall and {weight} heavy.") # so,you're 45 old, 173 tall and 80 weight.
"""
换一种写法:
age = input("How old are you?",) # 强迫症犯了,为什么有下划线,为什么抄一遍就没有
age = input("How old are you?",)
height = input("How tall are you?",)
weight = input("How much do you weight?",)
print(f"So, you're {age} old, {height} tall and {weight} heavy.")
"""
"""
input()
1、有问有答,终端区输入
2、函数好用,赋值第一,必须赋值
3、input的提示信息也是输出
4、输入类型必为str,数字需要转换类型int or float
"""
print(age+height+weight) # 所以,输入42、160、80运行结果为4216080,是字符串相加
print(float(age)+float(height)+float(weight)) # 这个就没有问题了