Python MCQ Quiz Source Code

Python MCQ Quiz Source Code
Python MCQ Quiz Source Code




 score=0


#Question1

a=input("Who was the first Indian woman in Space?")

if (a=="Kalpana Chawla"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

#Question2

a=input("Who was the first Indian in space?")

if (a=="Rakesh Sharma"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

    

#Question3

a=input("Who was the first Man to Climb Mount Everest Without Oxygen?")

if (a=="Phu Dorji"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

    

#Question4

a=input("Who wrote the Indian National Anthem?")

if (a=="Rabindranath Tagore"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

    

#Question5

a=input(" Who is the first Indian to win a Nobel Prize?")

if (a=="Rabindranath Tagore"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

#Question6

a=input("Who was the first President of India?")

if (a=="Dr. Rajendra Prasad"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

#Question7

a=input("Who was the first Indian to win the Booker Prize?")

if (a=="Arundhati Roy"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

    

#Question8

a=input("Omega Mission Hills World Cup is related to which game?")

if (a=="Golf"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

#Question9

a=input("Which social-media platform has launched a search prompt named ThereIsHelp to prevent suicide?")

if (a=="Twitter"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

    

#Question10

a=input("The Central Rice Research Station is situated in?")

if (a=="Cuttack"):

    score+=10

    print("Correct")

    print("score: ", score)

    print("\n")

else:

    score-=1

    print("Wrong")

    print("score: ", score)

    print("\n")

    

#Result    

if score>80:

    print("Excellent Work")

elif score>60:

    print("Good Work")

else:

    print("Try next time")

Comments