首页 > 编程语言 >【笨方法学python】ex11 - 提问

【笨方法学python】ex11 - 提问

时间:2022-10-05 04:12:22浏览次数:54  
标签:old weight python ex11 raw print input 方法学

代码如下:

点击查看代码
# -*-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

标签:old,weight,python,ex11,raw,print,input,方法学
From: https://www.cnblogs.com/TiramisuPS/p/16754971.html

相关文章