AUROBINDO INTERNATIONAL SCHOOL, JAIPUR
Session - 2025-26
PROJECT REPORT ON
QUIZ APPLICATION
NAME : SATWIK AGARWAL
ROLL_NO : 26
CLASS : XII (A)
SUBJECT : INFORMATICS PRACTICES
SUB. CODE : 065
PROJECT GUIDE : MRS. POOJA CHOUDHARY
PGT (IP)
CERTIFICATE
This to certify that _______________, Roll
no._______ of Class 12th Session 2025-26
has prepared the Project File as per the
prescribed Practical Syllabus of Informatics
Practices ,Code – 065 under my supervision.
Examiner’s Signature
Teacher In-Charge Principal
Signature Seal and signature
ACKNOWLEDGEMENT
I wish to express my deep sense of gratitude and
Gratefulness to our respected teacher Ms Pooja
Choudhary, Informatics Practices(PGT), Aurobindo
International School for her invaluable help, advice and
guidance in the preparation of this project.
I am also greatly indebted to our principal Ms Karuna
Nagpal and school authorities for providing me with the
facilities and requisite laboratory conditions for making
this project.
I also extend my thanks to a number of teachers, my
classmates and friends who helped me to complete this
project file successfully.
TABLE OF CONTENTS
S NO. TOPICS
1. PROJECT SYNOPSIS
2. ABOUT FRONTEND
(PYTHON)
3. ABOUT BACKEND (CSV)
4. HARDWARE AND SOFTWARE
REQUIREMENTS
5. CODING
6. PROGRAM OUTPUT
7. ADVANTAGES AND FUTURE
SCOPE
8. CONCLUSION
9. REFRENCES
PROJECT SYNOPSIS
OBJECTIVE
The primary objective of this project is to create an interactive
command-line interface (CLI) application using Python as the
frontend programming language. This frontend will enable users
(both administrators/teachers and students/quiz-takers) to interact
with the system seamlessly. The backend data storage will be
managed efficiently using Comma Separated Values (CSV) files.
The application will cater to two main user roles:
1. Administrator/Teacher Module: This section will provide
functionalities for managing the quiz content. This includes adding
new questions, specifying multiple-choice options, defining the
correct answer, updating existing questions, and deleting outdated
or irrelevant questions. This ensures that the quiz content remains
current and accurate.
2. Student/Quiz Taker Module: This module will allow users to
initiate and take the quiz. Questions will be presented sequentially,
and users will input their answers. The application will then
evaluate the responses, calculate a score, and display the final result
upon completion of the quiz.
The project will demonstrate key programming concepts such as file
handling (specifically CSV operations for persistent data storage), data
structures (lists and dictionaries for in-memory question management),
conditional logic, looping constructs, and function modularization.
Emphasis will be placed on creating a robust yet simple application,
including basic error handling to improve user experience. This Quiz
Application serves as a practical demonstration of how Python and CSV
can be leveraged to create effective and accessible data-driven tools for
educational purposes.
ABOUT FRONTEND
(PYTHON)
Python is an object-oriented programming language that is
designed in C. By nature, it is a high-level programming
language that allows for the creation of both simple as well as
complex operations.
HISTORY:
Python was created in the early 1990s by Guido van
Rossum at Stichting Mathematisch Centrum in the
Netherlands as a successor of a language called ABC.
Guido remains Python's principal author, although it
includes many contributions from others.
In 1995, Guido van Rossum continued his work on Python
at the Corporation for National Research Initiatives in
Reston, Virginia where he released several versions of the
software.
In May 2000, Guido van Rossum and the Python core
development team moved to [Link] to form the Be
Open Python Labs team. In October of the same year, the
Python Labs team moved to Digital
Creations, which became Zope Corporation. In 2001, the
Python Software Foundation was formed, a non-profit
organization created specifically to own Python-related
Intellectual Property. Zope Corporation was a sponsoring
member of the PSF.
Key Reasons for Choosing Python:
Simplicity and Readability: Python's syntax is clean and
intuitive, closely resembling natural language. This makes the
code easier to write, understand, and debug, which is
particularly beneficial for students learning programming
concepts.
Cross-Platform Compatibility: Python applications can run
on various operating systems (Windows, macOS, Linux)
without significant modifications, ensuring the project's
accessibility across different environments.
Rich Standard Library: Python comes with a
comprehensive standard library, which includes modules for
various tasks. For this project, the built-in csv module is
critically important, providing robust tools for reading from
and writing to CSV files effortlessly. This eliminates the need
for external dependencies for backend data management.
Interactivity: Although this project primarily uses a
command-line interface (CLI), Python's input () and print ()
functions provide powerful tools for creating interactive user
experiences, prompting users for input, and displaying results
clearly.
Modularity and Object-Oriented Capabilities: Python
supports modular programming through functions and allows
for object-oriented programming (OOP) paradigms. While a
basic CLI application might not extensively use advanced
OOP, the ability to define functions for specific tasks (e.g.,
add_question (), take_quiz ()) greatly enhances code organization,
reusability, and maintainability.
ABOUT BACKEND
(CSV)
CSV stands for Comma-Separated Values. It is a plain text file that
stores tabular data (like a spreadsheet or database table) in rows and
columns. Each row represents a record, and each column is separated
by a comma (,).
CSV files are widely used for data exchange, especially between
different applications (e.g., Excel, databases, Python programs).
Key Reasons for Choosing CSV as Backend:
Simplicity and Ease of Understanding: CSV files are
incredibly straightforward. They can be opened and viewed with
any text editor, spreadsheet software (like Microsoft Excel,
Google Sheets, or LibreOffice Calc), or even directly within a
web browser. This humanreadability makes it very easy to
inspect and manage the data directly, without needing specialized
database tools.
Lightweight and Portable: CSV files are lightweight and do
not require a complex database management system (DBMS) to
operate. This makes the project highly portable and easy to
distribute, as there are no external database installations or
configurations required.
Seamless Python Integration: Python has a powerful built-in
csv module that simplifies the process of reading from and
writing to CSV files. This module handles the complexities of
quoting, escaping special characters, and parsing different
delimiters, making data interaction highly efficient and less
prone to errors compared to manual string parsing.
HARDWARE AND SYSTEM
REQUIREMENTS
To successfully develop and run the Python-based Quiz
Application, specific hardware and software components are
necessary. These requirements are standard for most modern
computing environments and should be readily available.
4.1. Hardware Requirements:
The application is a command-line interface (CLI) program and is
not resource-intensive. Therefore, it has minimal hardware demands.
Processor: Any modern processor (e.g., Intel Core i3 or
equivalent AMD processor or higher). The application does
not require significant processing power.
RAM (Random Access Memory): Atleast 2 GB RAM, though
4 GB or more is recommended for overall system performance.
Storage: A minimum of 500 MB of free hard disk space. The
application's code and the CSV data files are very small. A SSD
(Solid State Drive) is preferable for faster boot times and
overall system responsiveness, but an HDD (Hard Disk Drive)
is perfectly adequate.
4.2. Software Requirements:
Operating System:
o Windows: Windows 7, 8, 10, or 11 (64-bit recommended).
o macOS: macOS 10.13 (High Sierra) or later.
o Linux: Any modern Linux distribution (e.g., Ubuntu, Fedora,
Debian).
Python Interpreter:
o Python 3.x: Specifically, Python 3.6 or a more recent
version is highly recommended (e.g., Python 3.9, 3.10, 3.11,
or 3.12). Older Python 2.x versions are deprecated and not
compatible with modern Python practices.
Code Editor/Integrated Development
Environment (IDE):
Recommended:
o VS Code (Visual Studio Code): A free, open-source, and
highly popular code editor with excellent Python support
(syntax highlighting, linting, debugging, extensions).
o IDLE (Integrated Development and Learning
Environment): Comes bundled with Python installation and
is suitable for beginners.
These requirements are standard and easily met, ensuring that the
development and execution of the Quiz Application are smooth and
accessible.
SOURCE CODE
PYTHON FILE([Link]):
import csv import
os import random
# --- Configuration –
CSV_FILE = '[Link]'
HEADERS = ['question_id', 'question_text', 'option_a',
'option_b', 'option_c', 'option_d', 'correct_answer']
# --- Utility Functions –
def clear_screen():
"""Clears the console screen.""" [Link]('cls'
if [Link] == 'nt' else 'clear')
def load_questions():
"""Loads questions from the CSV file."""
questions = [] if not
[Link](CSV_FILE) or
[Link](CSV_FILE).st_size == 0:
with open(CSV_FILE, 'w', newline='') as file:
writer = [Link](file)
[Link](HEADERS)
return questions
try:
with open(CSV_FILE, mode='r', newline='',
encoding='utf-8') as file:
reader = [Link](file) if
[Link] != HEADERS:
print("Warning: CSV headers do not match
expected format. Please check the CSV file.")
return []
for row in reader:
[Link](row)
except FileNotFoundError:
print(f"Error: {CSV_FILE} not found. Creating a
new one.")
except Exception as e:
print(f"An error occurred while loading questions:
{e}") return
questions
def save_questions(questions):
"""Saves the current list of questions to the CSV
file.""" try:
with open(CSV_FILE, mode='w', newline='',
encoding='utf-8') as file: writer =
[Link](file,
fieldnames=HEADERS)
[Link]() [Link](questions)
except Exception as e:
print(f"An error occurred while saving questions:
{e}")
def get_next_question_id(questions):
"""Generates a unique ID for a new question.""" if
not questions: return 1
return max(int(q['question_id']) for q in questions) +
1
# --- Admin Module Functions –
def admin_menu():
"""Displays the admin menu and handles choices."""
while True:
clear_screen() print("\n--- Admin Panel
---") print("1. Add New Question")
print("2. View All Questions")
print("3. Update Question") print("4.
Delete Question") print("5. Back to
Main Menu") choice = input("Enter
your choice: ")
if choice == '1':
add_question()
elif choice == '2': view_all_questions()
elif choice == '3':
update_question()
elif choice == '4':
delete_question()
elif choice == '5':
break else:
print("Invalid choice. Please try again.")
input("\nPress Enter to continue...")
def add_question():
"""Adds a new question to the CSV."""
clear_screen() print("\n--- Add New
Question ---") questions =
load_questions() q_id =
get_next_question_id(questions)
question_text = input("Enter question text: ")
option_a = input("Enter Option A: ") option_b
= input("Enter Option B: ") option_c =
input("Enter Option C: ") option_d =
input("Enter Option D: ")
while True:
correct_answer = input("Enter correct option
(A/B/C/D): ").upper() if correct_answer in
['A', 'B', 'C', 'D']:
break else:
print("Invalid option. Please enter A, B, C, or
D.")
new_question = {
'question_id': str(q_id),
'question_text': question_text,
'option_a': option_a,
'option_b': option_b,
'option_c': option_c,
'option_d': option_d,
'correct_answer': correct_answer
} [Link](new_question)
save_questions(questions)
print("Question added successfully!")
def view_all_questions():
"""Displays all questions from the CSV."""
clear_screen() print("\n--- All Questions ---")
questions = load_questions() if not questions:
print("No questions available.") return
for q in questions:
print(f"\nID: {q['question_id']}")
print(f"Question: {q['question_text']}")
print(f" A. {q['option_a']}") print(f" B.
{q['option_b']}")
print(f" C. {q['option_c']}") print(f" D.
{q['option_d']}") print(f" Correct Answer:
{q['correct_answer']}")
def update_question():
"""Updates an existing question."""
clear_screen() print("\n--- Update
Question ---") questions =
load_questions() if not questions:
print("No questions to update.") return
q_id = input("Enter the ID of the question to update:
")
found = False for i, q in
enumerate(questions):
if q['question_id'] == q_id:
print(f"\nEditing Question ID: {q_id}")
print(f"Old Question: {q['question_text']}")
q['question_text'] = input(f"Enter new question
text (current: '{q['question_text']}'): ") or
q['question_text'] q['option_a'] = input(f"Enter new
Option A
(current: '{q['option_a']}'): ") or q['option_a'] q['option_b']
= input(f"Enter new Option B
(current: '{q['option_b']}'): ") or q['option_b'] q['option_c']
= input(f"Enter new Option C
(current: '{q['option_c']}'): ") or q['option_c'] q['option_d']
= input(f"Enter new Option D (current: '{q['option_d']}'):
") or q['option_d']
while True:
correct = input(f"Enter new correct option
(A/B/C/D, current: '{q['correct_answer']}'): ").upper() if
not correct:
break
if correct in ['A', 'B', 'C', 'D']:
q['correct_answer'] = correct
break else:
print("Invalid option. Please enter A, B, C,
or D.")
save_questions(questions)
print("Question updated successfully!")
found = True break
if not found:
print("Question ID not found.")
def delete_question():
"""Deletes a question from the CSV."""
clear_screen() print("\n--- Delete
Question ---") questions =
load_questions() if not questions:
print("No questions to delete.") return
q_id = input("Enter the ID of the question to delete:
") initial_len = len(questions) questions = [q for q in
questions if q['question_id'] !=
q_id]
if len(questions) < initial_len:
save_questions(questions) print("Question
deleted successfully!")
else: print("Question ID not
found.")
# --- Quiz Taker Module Functions –
def start_quiz():
"""Starts the quiz for the user."""
clear_screen() print("\n--- Starting
Quiz ---") questions =
load_questions() if not questions:
print("No questions available for the quiz. Please
ask the administrator to add questions.") return
[Link](questions)
score = 0
total_questions = len(questions)
for i, q in enumerate(questions):
print(f"\n--- Question {i+1} of {total_questions} --
-") print(f"Q: {q['question_text']}")
print(f" A. {q['option_a']}")
print(f" B. {q['option_b']}")
print(f" C. {q['option_c']}")
print(f" D. {q['option_d']}")
user_answer = input("Your
answer (A/B/C/D):
").upper()
if user_answer == q['correct_answer']:
print("Correct!")
score += 1 else:
print(f"Incorrect. The correct answer was
{q['correct_answer']}.") input("Press
Enter to continue...")
print("\n--- Quiz Finished! ---") print(f"You
scored {score} out of
{total_questions}.") percentage = (score /
total_questions) * 100 if
total_questions > 0 else 0
print(f"Your percentage: {percentage:.2f}%")
# --- Main Application Loop –
def main_menu():
"""Displays the main menu and handles user
interaction."""
while True:
clear_screen() print("\n--- Welcome to the Quiz
Application ---") print("1. Start Quiz (Student)")
print("2. Admin Panel (Teacher)") print("3. Exit")
choice = input("Enter your choice: ")
if choice == '1':
start_quiz()
elif choice == '2':
# Basic password protection for admin panel
password = input("Enter admin password: ") if
password == "admin123":
admin_menu() else:
print("Incorrect password.")
elif choice == '3':
print("Exiting application. Goodbye!")
break else:
print("Invalid choice. Please try again.")
input("\nPress Enter to return to main menu...")
# --- Entry Point –
if __name__ == "__main__":
main_menu()
CSV FILE([Link]):
question_id,question_text,option_a,option_b,option_c,o
ption_d,correct_answer
1,"What is the capital of
France?","London","Paris","Rome","Berlin","B"
2,"Which planet is known as the Red
Planet?","Earth","Mars","Jupiter","Venus","B"
PROGRAM OUTPUT
SELECTION PANEL
ADMIN PANEL
ADDINING A QUESTION
VIEWING ALL QUESTION
U
PDATING A QUESTION
DELETING A QUESTION
STUDENT PANEL
ADVANTAGES
Simplicity and Ease of Use: The command-line interface
(CLI) is straightforward and intuitive, making it easy for
users to navigate and interact with the quiz and administrative
functions without complex graphical interfaces.
Cost-Effective Backend: Utilizing CSV files as the backend
eliminates the need for expensive or complex database
systems, making the project highly accessible and free to run.
Portability: Since Python is cross-platform and CSV is a
universal text format, the application can be easily deployed
and run on various operating systems (Windows, macOS,
Linux) without compatibility issues.
Clear Data Structure: The use of CSV ensures that the quiz
data (questions, options, answers) is stored in a structured,
human readable, and easily manageable format. Teachers can
even inspect or modify questions directly using spreadsheet
software.
Educational Value: The project serves as an excellent
demonstration of fundamental programming concepts in
Python, including file handling, data structures, conditional
logic, loops, and modular programming with functions.
Rapid Development: Python's clean syntax and rich standard
library (especially the csv module) allow for relatively quick
development and testing of the application's core features.
Automated Scoring: The application automatically grades the
quiz, providing instant results to students and eliminating the
need for manual checking by teachers, saving time and effort.
FUTURE SCOPE
User Management and Authentication:
o Enhancement: Implement a robust user registration and login
system. Store user credentials (usernames, hashed passwords)
in a separate CSV or small database.
o Benefit: Allows for personalized quizzes, tracking individual
student scores over time, and differentiating between student
and teacher roles with proper access control.
Database Integration:
o Enhancement: Replace CSV with a proper relational database
(e.g., SQLite for local desktop applications, or
MySQL/PostgreSQL for network-enabled systems).
o Benefit: Offers better data integrity, scalability, concurrent
access, and more complex querying capabilities, especially
important for large datasets or multi-user environments.
Advanced Quiz Features:
o Timer: Implement a time limit for the entire quiz or for
individual questions.
o Difficulty Levels/Categories: Allow questions to be
categorized by subject or difficulty, enabling users to select
specific quiz types.
o Question Shuffling & Option Shuffling: Randomize the order
of questions and the order of options within each question to
prevent memorization.
o Feedback System: Provide detailed feedback after each
question (e.g., "Correct," "Incorrect, the answer was X")
and a comprehensive review at the end.
CONCLUSION
The development of the Python-based Quiz Application
successfully demonstrates the effective use of Python as a
frontend programming language and CSV files as a
lightweight and accessible backend data storage solution.
This project has met its primary objectives of creating an
interactive command line application that facilitates both
quiz administration (adding, viewing, updating, deleting
questions) and quiz taking functionality (presenting
questions, evaluating answers, and displaying scores).
Throughout the development process, fundamental
programming concepts such as file I/O operations using
Python's csv module, efficient data management with
lists and dictionaries, control flow structures (loops and
conditionals), and modular design through functions were
extensively applied and reinforced. The choice of Python
proved beneficial due to its clear syntax, extensive
standard library, and crossplatform compatibility,
making the development process manageable and the final
application robust within its intended scope. The
simplicity of CSV files allowed for straightforward data
persistence without the overhead of complex database
systems, making it an ideal choice for this academic
project.
REFERENCES
[Link]
[Link]
INFORMATICS PRACTICES
TEXTBOOK
WIKIPEDIA
YOUTUBE
CODE ACADEMY
[Link]