Posts

Showing posts with the label python quiz program

Python Quiz Program

Basic Python Quiz Program quiz = { "question1": { "question": "What is the capital city of Pakistan?", "answer": "Islamabad" }, "question2": { "question": "When Pakistan separated from India?", "answer": "1947" }, "question3": { "question": "What is the name of the tallest mountain in the world?", "answer": "Everest" }, "question4": { "question": "What is the name of the nearest planet to the sun?", "answer": "Mercury" }, "question5": { "question": "Our sun is a star? Yes or No?", "answer": "Yes" } } score = 0 for key, value in quiz.items(): print("") print(value["question"]) correctAnswer