Also, ich bin neu in Python und halb neu zu Codierung im Allgemeinen und ich habe eine schwierige Zeit mit einfach meine Variable zu drucken.mein Text Abenteuer wird nicht drucken [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()
das Problem ist hier
#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()
, wenn ich den gewünschten Suchbegriff (e) eingeben hält es einfach das Programm, mich zurück in den Leerlauf zu bringen. jede Hilfe wird geschätzt.
Sie rufen vergessen zu 'raw_input' in' wenn raw_input == ("% s% s") ' –
Sie müssen eine Schleife irgendwo hinzuzufügen. Ohne es wird Ihr Skript das Ende erreichen und beenden. –