《笨办法学python》源码 Ex12.py



#-------------------------------------------------------------------------------
# Name:        ex_12.py
# Purpose:     输入提示raw_input()
#
# Author:      huanghuan
#
# Created:     14-08-2013
# Copyright:   (c) huanghuan 2013
# Licence:     <your licence>
#-------------------------------------------------------------------------------


# 带输入提示,技巧写法.
name = raw_input("name ? ")

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

print "So, you're %r, %r old, %r tall and %r heavy." % (
    name, age, height, weight)


# 查看帮助文档.
# pydoc raw_input
# pydoc open

你可能感兴趣的:(《笨办法学python》源码 Ex12.py)