笨办法学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 weight?",
weight = raw_input()

print "So, you're %r old, %r tall and %r heavy." % (
    age, height, weight)
  • 运行:


6'2",最后打印出来自动加上了\,是防止单引号被当作字符串的结尾,就需要\来转义单引号

你可能感兴趣的:(笨办法学Python ex11)