I am making a game of truth or dare. I cannot figure how after the else statement {the first inner else statement} I could start from the inner if statement {asking again if you want to answer yes or no, instead of truth or dare} instead of starting all the way from the beginning.
lives = 3
while lives > 0:
choice = input("truth or dare?: ")
time.sleep(0.5)
if choice == "truth":
print(random.choice(truth))
time.sleep(0.5)
answer_truth = input("want to answer? type yes or no: ")
time.sleep(0.5)
if answer_truth == "yes":
input("> ")
print("good answer")
time.sleep(0.5)
print(f"you have {lives} lives left")
elif answer_truth == "no":
print("you lost a life!")
time.sleep(1)
print(f"you have {lives} lives left")
else:
print("that is not an option")
elif choice == "dare":
print(random.choice(dare))
time.sleep(0.5)
do_dare = input("did you do the dare? type yes or no: ")
if do_dare == "yes":
print("well done!")
time.sleep(0.5)
print(f"you have {lives} lives left")
elif do_dare == "no":
print("you lost a life!")
lives -= 1
time.sleep(0.5)
print(f"you have {lives} lives left")
else:
print("that is not an option")
else:
print("that is not an option")
time.sleep(0.5)
print("GAME OVER!")