首页 > 编程语言 > 详细

【Python系列】Python3获取控制台输入

时间:2018-01-11 10:02:32      阅读:466      评论:0      收藏:0      [点我收藏+]
"""
接收控制台的输入
How old are you?
18
How tall are you ?
180
How much do you weigh?
50
So ,you are ‘18‘ old,‘180‘ tall and ‘50‘ heavy,

python3的控制台输入函数时input();
"""
print("How old are you?");

age=input();

print("How tall are you ?");

height=input();

print("How much do you weigh?");

weight=input();

print("So ,you are %r old,%r tall and %r heavy," %(age,height,weight));

  

【Python系列】Python3获取控制台输入

原文:https://www.cnblogs.com/dream-to-pku/p/8266906.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!