"NBA Quiz"


title: NBA Quiz

def quiz():
    points = 0
    questions = ["Who won the 2021-2022 NBA Championship?", "Which NBA franchise has the most MVP winners?", "Who won the 2021-2022 NBA MVP?", "Which NBA team(s) has the most rings?"]
    answers = ["Warriors", "Celtics", "Nikola Jokic", "Celtics"]
    num = 0
    while num <= 3:
        answer = input(questions[num])
        if answer == answers[num]:
            print("Correct")
            points = points + 1
        else:
            print("Incorrect")
        num += 1
    print("You got:", (points/4)*100, "%")
quiz()
Correct
Correct
Correct
Correct
You got: 100.0 %