2
所以,我是新来的python和半新到一般的编码和我只是让我的变量打印困难的时间。我的文本冒险不会打印[python]
#startup
startup = "welcome to 'da spoopy house', type 'start'"
work = raw_input(startup)
<here is full code>
#functions
#keywords
varlook = "look"
vargo = "go"
varhouse = "house"
#story
st01 = "You are outside, its dusk. there is a house in front of you. both you and the house are surrounded by a forest"
st02 = "You walk up to the house, you notice a small yard with flowers lining the perimeter. As you step up to the door, you notice a small note attached to the door"
#instructions... ?
#action
print st01
raw_input()
if varlook in work:
print "%s" % st01
raw_input()
if raw_input == ("%s to %s") % (vargo, varhouse):
print "%s" % st02
raw_input()
的问题是在这里
#action
print st01
raw_input()
if varlook in work:
print "%s" % st01
raw_input()
if raw_input == ("%s to %s") % (vargo, varhouse):
print "%s" % st02
raw_input()
当我键入所需的关键字它只是停止程序,把我背到空闲。 任何帮助表示赞赏。
你忘了叫'raw_input'在'的raw_input如果==( “%s到%s”)' –
你需要的地方增加一个循环。没有它,你的脚本将达到结束并终止。 –