【发布时间】:2015-07-15 06:17:44
【问题描述】:
print "This is a dating message that I am going to test, I want the user to be able to input their own answers."
print "I'd like for this message to work correctly, this is a dating message for Python"
print "Hi there, I think you're very cute and that's why I'm sending you this message"
print "I'm going to prompt you to see if you'd like to go on a date with me, type 'ok' to continue"
raw_input()
print "Type 'y' if you'd like to go out, or 'n' if you're not interested."
raw_input(y) = "Hooray I'm so happy to hear that! You should text me at 888-888-8888"
raw_input(n) = "Awww darnit, well best of luck to you!"
我对编程很陌生,实际上我现在正在上大学,但我只是好奇我在尝试将特定文本(例如输入)分配给 python 中的输入变量时遇到了麻烦,谁能告诉我我做错了什么?
【问题讨论】:
-
试试official Python tutorial - 它有很多关于这种事情如何工作的好信息。
标签: python variables text input raw-input