猫史档案馆


【Python作品分享】ex14【作品秀】

用户:谛霖谛霖查看:2 回复:4 评论:2 创建时间:2023-06-09T22:00:19


【作品展示】

center_image

 

【作品介绍】

听说说海龟可以添加参数,哪位大佬来演示一下

 

【作品源代码】

from sys import argv

scipt, username=argv
prompt = ">"

print(f"hi {username},i am the {scipt} script.")
print("i'd like to ask you a few questions")
print(f"do you like me {username}?")
likes = input(prompt)

print(f"where do you live {username}?")
lives = input(prompt)

print("What kind of computer do you have")
computer = input(prompt)

print(f"""
all right,so you said {likes} about liking me.
you live in {lives}. Not sure where that is.
And you have a {computer} computer.nice.
""")

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
mornwindmornwind

刚才那个说错了

点赞0


评论


mornwindmornwind

可以os.system

点赞0


评论


mornwindmornwind

点赞0


评论


谛霖谛霖

center_image

不知道为什么,没有找到这句话,那就在这里回复:可能吧,不过我买的纸质教程(笨办法学python)是说这玩意是提取脚本运行参数

点赞0


评论