0% found this document useful (0 votes)
6 views27 pages

JEE-Mains Result Analysis Project

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views27 pages

JEE-Mains Result Analysis Project

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ST.

THOMAS CENTRAL SCHOOL

COMPUTER SCIENCE PROJECT

JEE-MAINS RESULT ANALYSIS

NAME :
CLASS : XII-E
REG NO. :
DECLARATION
I, <name>, hereby declare that the following project "JEE-
MAINS RESULT ANALYSIS” via PYTHON-MYSQL
CONNECTIVITY has been completed in accordance with
guidelines and requirements set forth by my institution St.
Thomas Central School and under the supervision of my
subject teacher Mrs. Anupa K Narayanan. This project
represents my original work and I have taken all necessary
measures to ensure its accuracy and authenticity. Any external
sources, references or data used in this project have been duly
acknowledged in the bibliography section. I acknowledge that
the project was conducted with the utmost commitment to
scientific or and honesty.

1
ACKNOWLEDGEMENT
A successful completion of any task is incomplete without
mentioning the names of the people without whom it would
not have been possible
I would like to express my sincere thanks and gratitude to my
computer teacher Mrs. Anupa K Narayanan who gave me this
wonderful opportunity to do this project on ‘JEE-MAINS
RESULT ANALYSIS’, and for the guidance, support and
encouragement throughout the completion of this project.
I would also like to express my sincere gratitude to our lab
assistants Mrs. Elizabeth Jacob and Mrs. Lathika Devi for
their guidance, support and encouragement throughout the
project.
I would also like to thank our Principal Mr. Varghese Samuel
for giving me this chance to do a research on this topic and
also to learn something new in the process.
I wish to thank my parents as well for their undivided support
and encouragement throughout each and every step of my
project, without which I would not have been able to complete
my project.
Last but not the least, I would like to thank my friends who
displayed appreciation to my work and motivated me to
continue my work.

Thank You

2
CONTENTS

SL NO TITLE PAGE NO

1. OVERVIEW 4-6

2. SYSTEM REQUIREMENTS 7-8

3. PROGRAM 9-14

4. STRUCTURE OF THE TABLE 15

5. OUTPUTS 16-21

6. CONCLUSION 22-23

7. SCOPE FOR IMPROVEMENT 24-25

8. BIBLIOGRAPHY 26

3
OVERVIEW
JEE-MAINS RESULT ANALYSIS Overview

The JEE-MAINS RESULT ANALYSIS is a Python-based Menu-


driven program designed to interact with a MySQL Database,
facilitating easier analysis and management of data.

Here is a brief explanation of how the program works:


This program provides a basic interface for users to explore and
manage data stored in MySQL database which contains JEE-Mains
Results of students. It contains both predefined functions as well as
user-defined functions with which we can display, insert, delete or
modify data. Additionally, to run the program successfully, you need
to have a MySQL database set up with the necessary schema and data.

1. User-defined Functions:
A quick overview of the user-defined functions are given below
i. Display Table (display()): Fetches and prints the entire table of
students in a formatted manner.
ii. Insert Data (insert()): Takes input from the user to insert a new
student record.
iii. Sort by Rank (sort()): Orders the data by rank and displays it.
iv. Delete a Student (delete()): Deletes a student record based on their
name.
v. Update Rank (update()): Allows the user to update a student's rank.
vi. Highest Rank (highest()): Fetches and displays the student with the
highest rank.
vii. Lowest Rank (lowest()): Fetches and displays the student with the
lowest rank.
viii. Average Rank (average()): Displays the average rank.
ix. Distinct Branches (diff_branch()): Shows the different branches
chosen by students.

4
x. Students in Each Branch (part_branch()): Displays the number of
students in each branch.
xi. Display Specific Students (disp_stud()): Allows the user to select
specific students and displays their data.

2. Initialization and Database Connection:


 The program starts by importing the [Link]
library, which is commonly used to interact with MySQL
databases in the Python.
 It establishes a connection to a MySQL database named
‘JEE_MAINS’ hosted on the local machine (localhost)
using the provided credentials (user and password).

3. Menu:
 Upon running the program, the main menu is displayed to
the user.
 The menu includes several options, and it serves as the
starting point for program’s functionality.
 The user can choose any one from the choices given in the
menu. The program then runs according to the choice
given by the user.

4. Loop:
 The main loop (loop()) controls the overflow of the
program.
 It allows the users to keep using the program, exit or redo
their previous action, creating a user-friendly and
interactive experience.

5
5. Database Operations:
 The program uses SQL queries to interact with the
MySQL database, making use of the [Link]
library. It performs various functions which include
displaying the table or data, Inserting data, Updating data,
etc.

6. Closing the Program:


 If you want to end the program, just give a ‘No’ when "Do
you want to continue (Yes/No): " is displayed on the
screen. The program closes with a ‘Thank You!’.
 At the end of the program, the database cursor (cur) is
closed, and the database connection (con) is also closed to
ensure proper cleanup and proper functioning of the
database in future.

6
SYSTEM REQUIREMENTS
The minimum system requirements for running the provided Python program
with a MySQL database are as follows:

HARDWARE REQUIREMENTS:

Computer:
A desktop or laptop computer running one of the following operation
systems:
 Windows 10 or later
 MacOS 10.14 (Mojave) or later
 Ubuntu 18.04 LTS or later (for Linux Users)

Processor:
A modern processor with at least 1.6GHz clock speed, such as an Intel
Core i3 or equivalent.

RAM:
At least 2GB of RAM. However, 4GB or more is recommended for
smoother performance, especially when working with larger databases.

Storage:
A minimum of 10GB of free storage space for the operating system,
Python, and the database software. Additional space will be required for the
database itself and any data you plan to store.

Basic Peripherals:
 Monitor : A display screen to view and interact with the computer’s
graphical user interface.
 Keyboard : An input device used for typing and entering commands.
 Mouse : A pointing device used for moving the cursor on then screen and
selecting items.

7
SOFTWARE REQUIREMENTS :

Python:
The program is compatible with Python 3.x. You can download and
install Python from the official Python website
([Link] Ensure that you add Python to your system’s
PATH during installation.

MySQL Database Server:


MySQL Server : MySQL Community Edition 5.7 or later.
You can download it from their official site ([Link]

MySQL Database:
You should have a MySQL database named ‘JEE_MAINS’ created with
necessary schema and data. You can set up the database using MySQL
Workbench or command-line tools.

Python Libraries:
Install the [Link] library using pip:
‘pip install mysql-connector-python’

These specific requirements should help you set up and run the program
successfully on your system. It is important to ensure that you have necessary
database software installed and that you have created the database
‘JEE_MAINS’ with the appropriate schema and data as given above before
running the program.

8
PROGRAM
# Display Table
def display():
[Link]("SELECT * FROM students")
print("No Name JEE Total Physics Chemistry Maths Percentile
Branch Rank ")
data=[Link]()
for i in data:
print("%-8s%-12s%-11s%-9s%-11s%-7s%-12s%-8s% 6s"
%(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]))
[Link]()

# Insert Data
def insert():
st_no=int(input("Enter Student's no: "))
st_name=input("Enter Student name: ")
jee_total=int(input("Enter JEE Total Marks: "))
physics= int(input("Enter Physics Marks: "))
chemistry=int(input("Enter Chemistry Marks: "))
maths=int(input("Enter Maths Marks: "))
percentile=float(input("Enter Percentile: "))
branch= input("Enter Branch: ")
rank=int(input("Enter Rank: "))
c="INSERT INTO Students VALUES
({},'{}',{},{},{},{},{},'{}',{})".format(st_no, st_name, jee_total, physics,
chemistry, maths, percentile, branch, rank)
[Link](c)
[Link]()

9
# Sort according to the rank
def sort():
[Link]("SELECT * FROM students ORDER BY Rank")
print("No Name JEE Total Physics Chemistry Maths Percentile
Branch Rank ")
data=[Link]()
for i in data:
print("%-8s%-12s%-11s%-9s%-11s%-7s%-12s%-8s%-6s"
%(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]))
[Link]()

# Delete data of a student


def delete():
n=input("Enter the name of student to be deleted: ")
p= "DELETE from students where name='{}' ".format(n)
[Link](p)
[Link]()

# Update rank of a student


def update():
name=input('Enter the name of the student to be updated: ')
n=int(input("Enter Updated Rank: "))
c="UPDATE students SET rank={} where name='{}' ".format(n,name)
[Link](c)
[Link]()

# Display the Highest rank


def highest():
c='select min(rank) from students'
[Link](c)
data=[Link]()
for i in data:
print("Highest Rank = ",i[0])
[Link]()

10
# Display the Lowest rank
def lowest():
c='select max(rank) from students'
[Link](c)
data=[Link]()
for i in data:
print("Lowest Rank = ",i[0])
[Link]()

# Display the Average rank


def average():
c='select avg(rank) from students'
[Link](c)
data=[Link]()
for i in data:
print("Average Rank = ",i[0])
[Link]()

# Display the different branches chosen by students


def diff_branch():
c='select distinct branch from students'
[Link](c)
data=[Link]()
for i in data:
print(i[0])
[Link]()

# Display the no of students in a particular branch


def part_branch():
[Link]("select Branch,count(name) from students group by Branch")
data=[Link]()
for i in data:
print(i[0], ':',i[1])
[Link]()

11
# Display data of students
def disp_stud():
n=int(input("Enter no of students: "))
L=[]
for i in range (n):
if i==0:
N=input("Enter Name of the first Student: ")
[Link](N)
else:
N=input("Enter Name of the next Student: ")
[Link](N)
print()
[Link]("SELECT * FROM STUDENTS" )
d=[Link]()
if n>0:
print("No Name JEE Total Physics Chemistry Maths Percentile
Branch Rank ")
for i in d:
if i[1] in L:
print("%-8s%-12s%-11s%-9s%-11s%-7s%-12s%-8s% 6s"
%(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]))

12
#Main Program

import [Link]
con=[Link](
host='localhost',
user='root',
password='user123',
database='JEE_MAINS'
)
cur=[Link]()
print()
if con.is_connected:
print("Connection Successful")
else:
print("Connection Unsuccessful")
c="yes"
while c=="yes":
print('\n')
print('''Menu:
1. Display Table
2. Display data of students
3. Insert Data
4. Sort according to the rank
5. Delete data of a student
6. Update rank of a student
7. Display the Highest rank
8. Display the Lowest rank
9. Display the Average rank
10. Display the different branches chosen by students
11. Display the no of students in a particular branch''')
print('\n')
c1=int(input("Enter a choice no. : "))
print('\n')
if c1==1:
display()
elif c1==2:
disp_stud()

13
elif c1==3:
insert()
elif c1==4:
sort()
elif c1==5:
delete()
elif c1==6:
update()
elif c1==7:
highest()
elif c1==8:
lowest()
elif c1==9:
average()
elif c1==10:
diff_branch()
elif c1==11:
part_branch()
else:
print('Invalid Input')
print('\n')
c=input("Do you want to continue (Yes/No): ")
c=[Link]()
else:
print('\n')
print("Thank You!")
[Link]()

14
STRUCTURE OF THE TABLE

15
OUTPUTS

16
17
18
19
20
21
CONCLUSION
This project successfully implements a comprehensive database management
system for JEE-Mains students’ data using Python and MySQL. Through a
well-structured menu-driven interface, users can perform essential CRUD
operations such as displaying, inserting, updating, and deleting student records.
The program also provides valuable insights through features like sorting by
rank, displaying the highest and lowest ranks, calculating the average rank, and
showing distinct branches chosen by students.

The interactive design ensures that users with minimal programming knowledge
can easily manage student data, while the formatted output enhances the
readability of the information. Additionally, the program’s modularity and clean
structure make it easy to extend or modify in the future. With improved error
handling and input validation, this project could be further refined for practical,
real-world applications in educational institutions or similar environments.

Overall, this project demonstrates a strong foundation in database programming


and offers a useful tool for organizing and managing student data efficiently.

KEY HIGHLIGHTS:
 Structured Database Interaction: The program provides a clean interface
to interact with a MySQL database using Python, specifically for
managing JEE student data.
 User-friendly Interface: An intuitive menu system empowers users to
explore automobile data effortlessly.
 Comprehensive Functionality: It covers essential CRUD (Create, Read,
Update, Delete) operations:
Display, Insert, Update, Delete, and Sort records.
Additional data aggregation features like:
Highest/Lowest Rank, Average Rank, Distinct Branches, and
Student Count by Branch.

22
 Formatted Output: The output is neatly formatted using placeholders
(e.g., %-8s, %-12s), which ensures that the data is displayed in an
organized and readable table format.

 Sorting and Filtering: The program allows sorting by rank and selecting
specific students to display. This adds flexibility to the data retrieval
process.
 Data Aggregation: The functions for calculating the highest, lowest, and
average ranks, as well as displaying the number of students per branch,
provide useful insights into the dataset.
 Interactive Menu System: The menu-driven approach makes the program
user-friendly, allowing the user to select various actions in a guided
manner.
 Reusability: Functions are well-separated, making the program modular
and easier to maintain or extend.
These highlights make the program useful for managing student data while
offering a user-friendly interface and structured approach to interacting with a
database.

23
SCOPE FOR IMPROVEMENT
1. User Interface (UI): Enhance the user interface to make it more user-
friendly and visually appealing. You can use libraries like Tkinter or PyQt
for creating GUI applications in Python.
To improve the user interface, provide clear prompts, error messages, and
instructions to guide users.
2. Performance Optimization : Optimize database queries for better
performance, especially if dealing with a large dataset.
Consider caching frequently accessed data to reduce database load.
3. Search Functionality : Adding the ability to search for students by name,
rank, or branch would make it easier to find specific records in large
datasets.
4. Input Validation : Validate user inputs rigorously to prevent SQL injection
attacks and ensure data integrity.
Check for valid datatypes, lengths, and range to avoid data corruption.
5. Pagination for Large Datasets : If the number of students grows large,
displaying all records at once could become overwhelming. Implementing
pagination or limiting the number of records displayed at once would make
navigation easier.
6. Error Handling and Input Validation : Currently, there is no robust error
handling for invalid inputs or database failures. Adding exception handling
(using try-except blocks) would improve the program’s stability and prevent
it from crashing due to unexpected inputs or database connection issues.
7. User Feedback : Gather feedback from users to identify areas for
improvement and additional features they may need.
8. Export/Import Data : Provide options to export student data to CSV or
Excel files, or import data from such files. This would make the program
more versatile for data sharing and management.
9. Detailed Statistical Reports : Expand the data analysis features to generate
detailed statistical reports, such as the number of students scoring above a
certain percentile, distribution of ranks, or branch-wise performance
comparison.

24
10. Database Backup & Recovery : Implement regular data backup procedures
to safeguard data against loss or corruption. Develop a recovery plan in case
of database failures.
11. Enhanced Security : Beyond SQL injection prevention, securing the
connection to the MySQL database by encrypting passwords and using
more secure authentication methods would be beneficial, especially if
deployed in real environments.
By incorporating these improvements, the program can be made more secure,
efficient, and user-friendly, making it scalable for larger datasets and real-
world deployment.

25
BIBLIOGRAPHY
 SUMITA ARORA – COMPUTER SCIENCE WITH PYTHON for class 12
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]
 [Link]

26

You might also like