New to Python and just trying to get a loop to work for my text game.
I used an if/else statement with the while loop at the end but I'm pretty sure I used it wrong. I would prefer hints to figure it out myself instead of the answer, otherwise it's not a learning experience!
rules = input('Would you like to hear the rules? [Yes or No]')
if rules == 'Yes':
print('Your quest is to explore the Monastery and find the missing armor and sword of the Golden Knight.')
print('You will have to find a chest plate, gloves, sword, shield, helmet and boots.')
print('But do be cautious! Kron the Mad lies in wait for you somewhere inside.')
print('The directions you may travel are North, South, East and West.')
print('To pick up items, enter get "item name". Your inventory will be displayed upon entering a new area.')
input('Good luck! Press "Enter" to begin.')
if rules == 'No':
print('Good luck!')
else:
while rules != 'Yes' and rules != 'No':
print('Invalid input')
input(rules)