python学习第一天

from sys import argv

script,user_name = argv
prompt = '>'

print(f"Hi{user_name},I'm the {script}script.")
print("I'd like to ask you some question.")
print(f"DO you like me ,{user_name}?")

likes = input(prompt)

print (f"Where do you live, {user_name}?")
lives = input (prompt)

print("What kind of computer do you have ?")

computer = input(prompt)
print(f"""

Alright ,so you said {likes} about liking me.
You live in{lives}. Not sure where that is.
And you have a {computer} computer. Nice.
""")

为什么这个脚本不能直接用IDLE运行,而是在cmd中 用python命令执行?

posted @ 2020-04-01 23:23  顶点测试  阅读(124)  评论(0)    收藏  举报