Keeping Score in python code
Question: What do I have to do in order to have a score board for my code because I need
a score board. I tried a while statement but got lost there. Can you help me?
So lost.

    
    
    import random
    def main_menu():
        option = input("Play the game (P) , View the game credits (V), or Quit (Q)")
        if (option == "Play the game") or (option == "P"):
    
        riddles = [
                    {"riddle": "What walks on four legs in the morning, two legs in the afternoon, and three in the evening?",
                    "answer": ["Monkey", "Humans", "Nothing Silly"],
                    "correct": "2"},
                    {"riddle": "What has roots as nobady sees?",
                    "answer": ["River", "Famliy Tree", "Mountain"],
                    "correct": "3"},
                    {"riddle": " I am the ruin of men, and yet they lust for me. \
                    I have no power, no strength, and yet I am the might of kings and armies. \
                    I am hard as dragons scales, yet I flow like water. \
                    Men dream of me, and yet once found I am cast aside. \
                    I am a dancing rainbow, ever chased, never caught.",
                    "answer": ["Gold", "Sex", "Mountain"],
                    "correct": "1"}]
    
        print("Welcome to the Hell of Riddles!!!!")
        print("Hope you can think")
        random.shuffle(riddles)
        for riddle in riddles:
            print (riddle["riddle"])
    
            for i, choice in enumerate(riddle["answer"]):
                print(str(i + 1) + ". " + choice)
            answer = input("Choose the number of the answer:")
    
            if answer == riddle["correct"]:
                print("Congratz! You can think!!!")
            else:
                print("Not correct... Pathetic and disappointing.")
    elif (option == "View the game credits") or (option == "V"):
        print("This game is brought to you by: Hailey Reisner and Ashleigh Woodard")
    elif (option == "Quit") or (option == "Q"):
        print("QUITER")
    
    print(main_menu())
    


Answer: create a counter and add to it for correct answers. You can also create a
counter for wrong answer

Of course you want to declare these variables first.

so the code to increment your counter would be like : rightAnswer += 1

    
    
    if answer == riddle["correct"]:
            print("Congratz! You can think!!!")
            rightAnswer+=1
        else:
            print("Not correct... Pathetic and disappointing.")
            wrongAnswer+=1
    
    print('Right: %d\tWrong: %d) % (rightAnswer, wrongAnswer) 
    

