首页 > 代码库 > ex14
ex14
1 # -*-coding:utf-8 -*- 2 from sys import argv 3 4 script, user_name, city = argv 5 rompt = ">>" #巧妙的提示符的运用 取一个变量名就ok了 6 7 print ("Hi %s, I‘m the %s script." %(user_name, script)) 8 print ("I‘d like to ask you a few questions.") 9 print ("DO you like me %s?" % user_name) 10 likes = input(rompt) 11 12 print ("where do you live in %s?" % city) 13 lives = input(rompt) 14 15 print ("what kind of computer do you have?") 16 computer = input(rompt) 17 18 print (""" 19 Alright, so you said %s about liking me. 20 You live in %s. Not sure where that is. 21 And you have a %s computer. Nice. 22 """ %(likes, lives, computer))
ex14
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。