[[email protected] ~]# python raw_input.py
Plz input your name? : lookback
How old are you? : 26
What about your job? : IT
Hello lookback , You're 26 years old.
You're still very young.
You're a loser!
[[email protected] ~]# vi raw_input.py
[[email protected] ~]#
[[email protected] ~]# python raw_input.py
Plz input your name? : lookback
How old are you? : 26
What about your job? : IT
Hello lookback , You're 26 years old.
You're still very young.
You're a loser!
[[email protected] ~]# cat raw_input.py
#!/usr/bin/env python
#-*- encoding: utf-8 -*-
#########################################################################
# File Name: raw_input.py
# Author: LookBack
# Email: admin#dwhd.org
# Version:
# Created Time: 2015年08月20日 星期四 23时41分18秒
#########################################################################
name = raw_input("Plz input your name? : ")
age = raw_input("How old are you? : ")
job = raw_input("What about your job? : ")
if name == "lookback" :
print ""
print ""
print "Hello %s , You're %s years old." % (name,age)
else :
print "Sorry, %s I don't know you! But you're %s years old." % (name,age)
print "This Python print"
if age <= "27" :
print "You're still very young."
else :
print "You're old!"
if job == "IT" :
print "You're a loser!"
else :
print "You''re very goog!"
[[email protected] ~]#
2015年8月26日 下午5:14 1F
你这个连基本的赋值类型都没有定义啊……,数值后面万一有空格咋办。。差评
2015年8月27日 上午1:43 1B
@ Summer 哈哈哈。。。sorry。。。确实不严谨。。。您还是一如既往的对我这样要求。。。这点必须和你学习