【笨方法学python】ex11 - 提问

代码如下:

点击查看代码
# -*-coding:utf-8- -*-
# 提问

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

print "So, you're %r old, %r tall and %r heavy." % (age, height, weight)
print "So, you're %s old, %s tall and %s heavy." % (age, height, weight)
# input() 函数会把输入的内容当作 python 代码进行处理,会存在安全风险。
# raw_input() 会将输入的内容完整输出

执行结果:
image

posted @ 2022-10-05 04:05  TiramisuPS  阅读(18)  评论(0编辑  收藏  举报