码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2018-01-11 11:30:01      阅读:789      评论:0      收藏:0      [点我收藏+]

标签:height   控制台   gpo   you   blog   and   highlight   函数   put   

"""
接收控制台的输入
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获取控制台输入

标签:height   控制台   gpo   you   blog   and   highlight   函数   put   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!