Simple Quiz program Using Python

#using dictionary concept  {key : values}
quiz={

        "Q.1":{
            "ques":"Which city  Webgapp  is located? \nA.Chennai \t
B.Trichy \nC.Madurai \tD.Delhi",
            "ans":"C"},
        "Q.2":{            "ques":"What is reason for student's visit to WebGapp? \nA.Inertship \tB.Project Development \nC.Buy Project \tD.Customizing Computers ",
            "ans":"A"},
        "Q.3":{
            "ques":"What is the basic intership provided by WebGapp? \nA.Java,HTML,CSS \t B.C++,HTML,CSS \nC.Java Script,HML,Python D.Python,HTML,CSS",
            "ans":"D"},
        "Q.4":{
            "ques":"What is the basic web developing language? \nA.HTML,CSS \tB.HTML,Java Script \nC.HTML,Python \tD.CSS,JUava Script",
            "ans":"A"},
        "Q.5":{
            "ques":"What is the primary project of WebGapp? \nA.Web designing \t
B.Web Development and Designing\nC.Internship \tD.Game development",
            "ans":"B"},
    }

score = 0

for key, value in quiz.items():
    print(value[ 'ques'])
    answer=input("\nEnter the option : ")
    if answer.lower() == value[ 'ans'].lower():
        print("\nCorrect answer!\n")
        score+=10

    else:
        print("\nWrong answer! Try again \n")
        


print("Your score is", score,"/50")
print("You answered ",score/10," correctly out of 5 questions.")
print("Your average score is ",int((((score/10)/5)*100)),"%. ")


Join our team, where career growth knows no limits.

For More Details

Our internship program guarantees personalized attention for optimal career development in the tech industry.

+91 97879 68375

-> You should bring your own laptop during the internship

Who can apply?

Internships are open for students who: B.E / B.Tech / M.E / M.Tech / B.Sc / M.Sc / M.C.A / B.C.A / Diploma.

  • Ongoing Students Only
  • days, 5days/ 10days or Based on Student Preference
  • Limited 1 to 10 students per slot
  • Registration fees : 1000 INR
  • Slots are filling quickly only fewer slots are available