码迷,mamicode.com
首页 > 编程语言 > 详细

笨办法学python 习题14 优化过 遇到问题的请看

时间:2018-10-28 11:20:26      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:where   学python   port   out   about   raw_input   int   优化   question   


print "\t what‘s you name?"
user_name = raw_input(‘>‘)

from sys import argv
script, = argv

prompt = ‘>‘

 

 

 


print "\t hi %s,I‘m the %s script"%(user_name,script)
print "\t I‘d like to ask you a few questions"

print "\t Do you like me %s"%(user_name)
likes = raw_input(prompt)

print "\twhere do you live %s?"%(user_name)
lives = raw_input(prompt)

print "\twhat kind of computer do you have?"
computer = raw_input(prompt)

print ‘‘‘
\t Alright,you say ‘%r‘ about liking me.
\t you live in ‘%r‘.Not sure where that is.
\t And you have a ‘%r‘ computer. Nice!
‘‘‘ %(likes,lives,computer)

笨办法学python 习题14 优化过 遇到问题的请看

标签:where   学python   port   out   about   raw_input   int   优化   question   

原文地址:https://www.cnblogs.com/HL77961/p/9864553.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!