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」)' –
你需要的地方增加一個循環。沒有它,你的腳本將達到結束並終止。 –