New to python3 working on a fantasy character generator, tyring to find the best way to rerun the snippet of code if the wrong letters are entered in input.
Thanks for any help you can give me.
Thanks for any help you can give me.
Python:
#Code to exit or reginirate script
quittogen = input("""\nDo you want to quit or generate another creature?
Type q to quit or g to generate a new creature.""")
if str(quittogen) == "q" or str(quittogen) == "Q":
input("Thank you for using the Fantasy Creature Generator.")
elif str(quittogen) == "g" or str(quittogen) == "G":
print("Generating New Creature\n")
else:
if str(quittogen) != "q" or str(quittogen) != "g" or \
str(quittogen) != "Q" or str(quittogen) != "Q":
quittogen = input("""\nDo you want to quit or generate another
creature? Type q to quit or g to generate a new creature.""")
#Need a else code here to repeat the whole upper code