How do I exit the loop if the user doesnt want to roll again? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How do I exit the loop if the user doesnt want to roll again?

https://code.sololearn.com/cZ8yrUM7b19a/?ref=app

27th Mar 2019, 1:55 AM
Jesse Douglas
Jesse Douglas - avatar
2 ответов
+ 1
Change while userRoll == "Yes" or "yes": To while userRoll == "Yes" or userRoll == "yes": Same goes for the other while/if loops containing "or".
27th Mar 2019, 2:18 AM
Diego
Diego - avatar
+ 3
Or change it to while userRoll.lower() == 'yes', so that 'YES', 'yES' etc. are also caught
27th Mar 2019, 6:42 AM
Anna
Anna - avatar