Может ли кто-нибудь помочь мне не завершать работу кода всякий раз, когда я ввожу «правильно» [закрыто]Python

Программы на Python
Ответить
Anonymous
 Может ли кто-нибудь помочь мне не завершать работу кода всякий раз, когда я ввожу «правильно» [закрыто]

Сообщение Anonymous »

Я понимаю, что это на первый взгляд просто, я новичок, прошу прощения, если зря потратил чье-то время, но я совершенно растерялся, вот мой код
print ("you awaken in a dark room")
print ("you look to your left, a sword is placed next to your side")
print ("do you pick up the sword?")
choice = input("> ").lower()

if choice == "yes":
print ("You pick up the sword")
print ("With sword in hand you walk down the tunnel, you are confronted with the choice of turning left or right")

choice = input("> ").lower()
if choice == "left":
print ("you turn left and face a goblin")
print ("Do you attack?")
choice = input("> ").lower()
if choice == "yes":
print ("You attack the goblin and the goblin dies by your blade ")
elif choice == "no":
print ("the goblin strikes your torso, causing a large gash. This weakens you")

elif choice == 'right':
choice = input('> ').lower
print ("you reach a cavern with a shield, do you pick it up?")
if choice == 'yes':
print ("you pick up the shield, its weight comfortable on your arm and you prepare yourself for the journey ahead")
elif choice == 'No':
print ('you ignore the shield and carry on your voyage')


Подробнее здесь: https://stackoverflow.com/questions/798 ... nput-right
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Python»