Python系列Python3获取控制台输入

Posted 霓裳梦竹

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python系列Python3获取控制台输入相关的知识,希望对你有一定的参考价值。

"""
接收控制台的输入
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获取控制台输入的主要内容,如果未能解决你的问题,请参考以下文章

如何升级到python3版本并且安装pip3及ipython3

(07)-Python3之--函数

python3练习:while循环

python3 线程_threading模块

002_Python3基础语法

python3