#!/usr/bin/env python
#_*_ codeing:utf-8 _*_
name=raw_input('name:')
job=raw_input('job:')
salary=raw_input('salary:')
real_age=23
for i in range(10):
age=input('age:')
if age > real_age:
print 'think smaller'
elif age == real_age:
print '\033[32;1mGood! You guess correctly\033[0m'
break
else:
print 'Think bigger'
print 'You still have %d times to guess ' %(9-i)
print '''personal info %s:
name :%s:
job :%s
salary :%s
age :%d
'''%(name,name,job,salary,real_age)
note:格式化输出
#_*_ codeing:utf-8 _*_
name=raw_input('name:')
job=raw_input('job:')
salary=raw_input('salary:')
real_age=23
for i in range(10):
age=input('age:')
if age > real_age:
print 'think smaller'
elif age == real_age:
print '\033[32;1mGood! You guess correctly\033[0m'
break
else:
print 'Think bigger'
print 'You still have %d times to guess ' %(9-i)
print '''personal info %s:
name :%s:
job :%s
salary :%s
age :%d
'''%(name,name,job,salary,real_age)
note:格式化输出