Class 12 Computer Science Project Viva Sheet –
Quiz Program
Q: What is your project about?
A: A quiz program for 5 subjects with 10 questions each.
Q: Which language did you use?
A: Python for logic and MySQL for database.
Q: What is the main purpose?
A: To test knowledge and apply Python + SQL concepts.
Q: How many subjects are there?
A: Five – CS, Physics, Chemistry, Maths, and Biology.
Q: How many questions per subject?
A: Ten multiple-choice questions.
Q: What are the main features?
A: Menu-driven interface, scoring, high score, and reset.
Q: What type of program is it?
A: A menu-driven interactive quiz program.
Q: What are the Python concepts used?
A: Loops, functions, conditionals, random module, SQL connectivity.
Q: Why did you use functions?
A: To organize code and make it modular.
Q: What does random.shuffle() do?
A: It changes the question order randomly.
Q: Why didn’t you use enumerate()?
A: Because CBSE syllabus uses only basic Python functions.
Q: What is indentation in Python?
A: It defines blocks of code like loops or functions.
Q: What is the backend of your project?
A: MySQL database stores all data permanently.
Q: What is the frontend of your project?
A: Python console where user interacts.
Q: What are the two tables used?
A: questions and scores.
Q: What does the questions table store?
A: Subject, question, options, and correct answer.
Q: What does the scores table store?
A: Name, subject, and score of the player.
Q: What is commit() used for?
A: To save changes to the database.
Q: What is cursor() used for?
A: To execute SQL queries from Python.
Q: What is a primary key?
A: A unique value that identifies each record.
Q: How do you insert a record?
A: Using INSERT INTO command.
Q: How do you view all scores?
A: Using SELECT * FROM scores;
Q: How do you find the highest score?
A: SELECT subject, MAX(score) FROM scores GROUP BY subject;
Q: How do you delete all scores?
A: DELETE FROM scores;
Q: How do you reset high scores?
A: By clearing all records in the scores table.
Q: What is menu-driven programming?
A: Program offers options for user to choose actions.
Q: How is the score calculated?
A: One mark per correct answer.
Q: How do you take input from user?
A: Using input() function.
Q: What happens when user exits?
A: Program displays goodbye message and stops.
Q: Why is this project useful?
A: Helps students practice and learn interactively.
Q: What improvements can be made?
A: Add timer, GUI, or more subjects in future.
Q: What is the database name?
A: quizdb.
Q: Why use VARCHAR(255) for question?
A: Because it stores short text easily.
Q: What happens when you reset?
A: All scores are deleted from database.
Q: What module connects Python to MySQL?
A: mysql.connector.
Q: How is data stored permanently?
A: In MySQL database.
Q: What SQL command creates a database?
A: CREATE DATABASE quizdb;
Q: What are your key learnings?
A: Python coding, SQL queries, and integration concepts.
Q: How many marks per question?
A: 1 mark each.
Q: What is the output of high score option?
A: Displays top score per subject.
Q: Can more questions be added?
A: Yes, through SQL INSERT command.
■ Quick Summary:
Project: Quiz Program using Python & MySQL
Subjects: 5 | Questions per subject: 10
Key Topics: Loops, Functions, MySQL Connection, File Handling
Tables: questions, scores
Purpose: Practical learning & knowledge testing