def Start():
answer = input('Would you like instructions? (Yes/No): ')
if (answer == 'Yes' or 'yes'):
help()
name = getName()
room1(name)
else:
name = getName()
room1(name)
I have this chunk of code. Start() calls the question, "Would you like instructions? (Yes/No): " Whatever value I type in gets stored as answer. If I want to call the function help(), I have to type in yes. If I don't want to call help() and I just wanna jump in, I have to type no. However, regardless if I type yes or no, the help statement is always called.
Aucun commentaire:
Enregistrer un commentaire