Ich bin wirklich neu in Python und ich versuche zu lernen, indem Sie ein einfaches Spiel. Ich möchte, dass der Benutzer in der Lage ist, seine Aktion einzugeben, und wenn er sich nicht zu weit fortsetzt, werden sie zurück zur Eingabeebene gesendet. Ich habe es so gut wie möglich versucht, aber wenn sie sich nicht mehr "weitermachen", können sie keine der anderen Optionen mehr wählen.Wie mache ich meine Python-Code-Schleife zurück
Hilfe ist willkommen.
print ("How do you proceed?")
print ("Do you Shout? Look? Continue?")
action1 = input()
if action1 == ("Continue"): #Continue to next section
print ("You continue on throught the darkness untill you reach a cold stone wall")
pass
elif action1 == "Shout":
print ("In the dark noone can hear you scream.")
elif action1 == ('Look'):
print ("'I cannae see anything in the dark' you think to yourself in a braod Scottish accent.")
while action1 != ("Continue"):
print ("Enter your next action.(Case sensitive!!)")
print ("Shout? Look? Continue?")
action1 = input() #Want this too loop back to start of action menu