python exercise 14

来源:互联网 发布:炫踪网络上市吗? 编辑:程序博客网 时间:2024/06/07 15:43
from sys import argvscript, user_name = argvprompt = '>'print ("Hi %s, I'm the %s script." % (user_name, script))print ("I'd like to ask you a few questions .")print ("Do you like me %s?" % user_name)likes = input(prompt)print ("Where do you live %s?" % user_name)lives = input(prompt)print ("What kind of computer do you have?")computer = input(prompt)print ("""Alright, so you said %r about liking me.You live in %r. Not sure where that is.And you have a %r computer. Nice.""" % (likes, lives, computer))# C:\Users\Administrator\Desktop\projects\test>ex14.py woo

运行的时候需要 输入变量,就是定义的量“woo”   可以自己随便定义

0 0