LearnPython3theHardWay__Excercise 11 Asking Qustions

知识点:print(end=’’)的用法,input的用法
经过大量烦躁的练习后,我们现在get data into your programs。大部分的软件做的是以下的事情 :
1、让用户输入点什么
2、包装一下
3、输出包装后的结果

print("How old are you?", end=" ")
age = input()
print("How tall are you?", end=" ")
height = input()
print("How much do you weight?", end=" ")
weight = input()

print(f"So,you're {age} old, {height} tall and {weight} heavy.")

What you should see
How old are you? 38
How tall are you? 6'2"
How much do you weight? 180lbs
So,you're 38 old, 6'2" tall and 180lbs heavy.
Study Drills

1、上网查查 input是干啥滴
2、你能找其他方法使用input么
3、制作相似的提问表

猜你喜欢

转载自blog.csdn.net/byakki/article/details/86586103
今日推荐