Python
Python
PROJECT REPORT
ON
MINI PROJECT
ENTITLED
“Snack Game”
SUBMITTED BY
Dhokiya Smit S. (226090307023)
Manga Ketan M. (226090307052)
To
COMPUTER ENGINEERING DEPARTMENT
C U SHAH GOVT. POLYTECHNIC – SURENDRANAGAR
COMPUTER ENGINEERING
CERTIFICATE
This is to certify that the Mini Project entitled “________Quiz Game_____________” has
Semester of Gujarat Technological University, Ahmedabad during the academic year 2023
Guides:
COMPUTER ENGINEERING
CERTIFICATE
This is to certify that the Mini Project entitled “_______Quiz Game____________” has been
Semester of Gujarat Technological University, Ahmedabad during the academic year 2023
Guides:
3. Scorekeeping:
◊ Keep track of the user's score.
◊ Update the score based on whether the user's response is correct.
Code of Project
# Quiz questions and answers
questions = [
{
"question": "What is the capital of France?",
"options": ["Paris", "London", "Berlin", "Madrid"],
"answer": "Paris"
},
{
"question": "Which planet is known as the Red Planet?",
"options": ["Jupiter", "Mars", "Venus", "Saturn"],
"answer": "Mars"
},
{
"question": "What is the largest mammal in the world?",
"options": ["Elephant", "Blue Whale", "Giraffe", "Hippopotamus"],
"answer": "Blue Whale"
}
]
def run_quiz(questions):
score = 0
total_questions = len(questions)
# Display options
for idx, option in enumerate(question_data['options'], start=1):
print(f"{idx}. {option}")
Screenshots
References
1.https://www.apnacollege.in.com/
2.https://chat.openai.com/
3.https://www.google.com/
4.www.youtube.com
5.https://www.w3schools.com/