You are on page 1of 19

Introduction

The Student Result Analysis System is a project developed using


Python and csv files. The project allows users to analyse the results of
a student's performance in a given exam by providing the user with
various visualisations which helps them to understand the results
better. This system is designed to help the students and teachers alike
to get a better understanding of the student's performance and to be
able to compare the performance across different subjects.

Objective
The main objective of the Student Result Analysis System is to provide
a better way to analyse the performance of students in a given exam.
The system will allow users to compare the results of different
students, compare their performance across different subjects and to
identify the areas in which they need to work more in order to improve.
The system will also provide users with various visualisations which will
help them to understand the data better.

Proposed System

Analysis The analysis of the data is done using Python code. The code
is used to calculate the marks obtained by each student in each
subject and the grade obtained by them. It also calculates the average
marks and grades obtained by each student across all the subjects.
The code is also used to generate various visualisations which help the
user to understand the data better. The visualisations include bar
graphs, line graphs and scatter plots which can be used to compare
the performance of different students and to identify the areas in which
they need to work more in order to improve.
LIMITATIONS OF OUR PROJECT:
1- User ID and Password control is missing
2- Online and remote operation is missing
5- Internet and cloud based database is missing
HARDWARE AND SOFTWARE REQUIREMENT
Hardware Requirements:
 A computer or laptop with OS :-windows 7 or above
 Processor : x86 64-bit CPU (Intel / AMD architecture)
 RAM : 4 GB RAM
 Disk Space : 5 GB free disk space.
Software Requirements:
 Python 3.6.x or higher version
 Pandas library preinstalled
 Matplotlib library preinstalled
 Ms-Office Pre-installed for documentation

OPERATING SYSTEM

Windows 7.0 Onwards


Windows 7 is a major release of the Windows NT operating system
developed by Microsoft. It was released to manufacturing on July
22, 2009, and became generally available on October 22, 2009. It is
the successor to Windows Vista, released nearly threeyears earlier

OVERVIEW OF PYTHON 3.7 (32 BIT)


Python is an interpreter, object-oriented, high-levelprogramming
language with dynamic semantics. It was developed by Guido Van
Rossum.
Its high-level built in data structures, combined with dynamic typing
and dynamic binding; make it very attractive for Rapid Application
Development, as wellas for use as a scripting or glue language to
connect existing components together.
Python's simple, easy to learn syntax emphasizes readability and
therefore reduces the cost of programmaintenance. Python supports
modules and packages,which encourages program modularity and
code reuse.
Python Libraries:Pandas

Pandas is a Python library for data analysis. Startedby Wes


McKinney in 2008 out of a need for a powerful and flexible
quantitative analysis tool, pandas has grown into one of the most
popular Python libraries. It has an extremely active community of
contributors.
Pandas is built on top of two core Python libraries— matplotlib for
data visualization and NumPy for mathematical operations. Pandas
acts as a wrapper over these libraries, allowing you to access many
of matplotlib's and NumPy's methods with less code. Forinstance,
pandas' .plot() combines multiple matplotlibmethods into a single
method, enabling you to plot a chart in a few lines.
Before pandas, most analysts used Python for data
munging and preparation, and then switched to a more domain
specific language like R for the rest oftheir workflow. Pandas
introduced two new types of objects for storing data that make
analytical taskseasier and eliminate the need to switch tools: Series,
which have a list-like structure, and Data Frames, which have a
tabular structure.
PYTHON LIBRARY -MATPLOTLIB

Matplotlib is an amazing visualization library in Python for 2D plots


of arrays. Matplotlib is a multi-platform data visualization library
built on NumPy arrays and designed to work with the broader SciPy
stack. It was introduced by John Hunter in the year 2002.
One of the greatest benefits of visualization is that it allows us visual
access to huge amounts of data in easily digestible visuals.
Matplotlib consists of severalplots like line, bar, scatter, histogram
etc.
Matplotlib comes with a wide variety of plots. Plotshelp to
understand trends, patterns, and to make correlations. They’re
typically instruments for reasoning about quantitative information.
CSV FILE:-
A comma-separated values file is a delimited text file that uses a
comma to separate values. Each line of thefile is a data record. Each
record consists of one or more fields, separated by commas.
STUDENT RESULT ANALYSIS SYSTEM
View CSV FILE(Book1.csv)
Source Code
import pandas as pd
import numpy as np
import math
import sys
import time
import matplotlib.pyplot as plt

global df
df=pd.read_csv("Book1.csv")
df['Hindi']=df['Hindi'].fillna(0)
sch_code=int(input("Enter School Code : "))
session=input("Enter Session : ")
ttl=df.Eng+df.Hindi+df.Maths+df.Science+df.S_Sc
df.insert(8,'Total',ttl)
df.insert(9,'Percent',df.Total*100/500)

def menu():
while True:
print("-------------------------------------------------------------------------------------------
---------------")
print("Session :",session," Sch. No-
",sch_code)
print("-------------------------------------------------------------------------------------------
---------------")
print(''' RED ROSE SECONDARY SCHOOL EXAMINATION RESULT
ANALYSIS
---------------------------------------------------------------------------------------------------------

1- DISPLAY RESULT SHEET


2- PERCENTAGE RANGE ANALYSIS
3- TOTAL VS DISTINCTION ANALYSIS( SUBJECT WISE )
4- TOTAL VS PASS ANALYSIS ( SUBJECT WISE )
5- 90% AND ABOVE ( SUBJECT WISE )
6- TOP 10 STUDENTS
7- EXIT''')
ch=int(input("\nEnter your Choice (1-7):"))
if ch==1:
result_sheet()

elif ch==2:
per_analysis()
elif ch==3:
distinction()
elif ch==4:
passed()
elif ch==5:
ninety_above()
elif ch==6:
top_10()
else:
my_chance=input("Do you really want to exit?(y/n)")
if my_chance=='y' or my_chance=='Y':
str="THANK YOU VERY MUCH FOR USING THIS PROJECT.
EXITING....."
for k in str:
print(k,end='')
time.sleep(0.1)
sys.exit()
else:
print("\nInvalid choice. Try again")
continue

# Result Sheet display


def result_sheet():
print('-------------------------------------------- RESULT SHEET ----------------------------
---------------')
print(sch_code,"-","RED ROSE SENIOR SECONDARY SCHOOL"," Session
:",session)
print("----------------------------------------------------------------------------------------------
------------------")
print(df)
print()
print()

#Percentage range Analysis


def per_analysis():
count_90=0
count_75=0
count_60=0
count_45=0
count_33=0
count_32=0
for i in range(len(df)):
if df.Percent[i]>=90:
count_90+=1
elif df.Percent[i]>=75:
count_75+=1
elif df.Percent[i]>=60:
count_60+=1
elif df.Percent[i]>=45:
count_45+=1
elif df.Percent[i]>=33:
count_33+=1
else:
count_32+=1

c1=(count_90/df.Name.count())*100
c2=(count_75/df.Name.count())*100
c3=(count_60/df.Name.count())*100
c4=(count_45/df.Name.count())*100
c5=(count_33/df.Name.count())*100
c6=(count_32/df.Name.count())*100
per_range=[c1,c2,c3,c4,c5,c6]
dict1={"No of
Students":[count_90,count_75,count_60,count_45,count_33,count_32],"Percent
STD":per_range}

percent_df=pd.DataFrame(dict1)

percent_df.index=["90.0-100.0%","75.0-89.9%","60.0-74.9%","45.0-59.9%","33.0-
44.9%","Less than 33"]
print(percent_df)
print()
print()
while True:
choice=input("Enter type of chart : L-Line, B-Bar, X-Exit :")
if choice=='L':

percent_df.plot(kind="line",rot=30,linewidth=3,linestyle='dashed',marker='^',markered
gecolor='r')
elif choice=='B':
percent_df.plot(kind="bar",rot=30)
else:
print("Exiting......")
break
plt.xlabel('Percentage Range->',color='g',fontsize=12)
plt.ylabel('No.of Students->',color='g',fontsize=12)
gtitle1="RED ROSE SENIOR SECONDARY SCHOOL"+"\nPercentage Range
Analysis "+session
plt.title(gtitle1,fontsize=16,color='b')
plt.grid()
plt.show()

# Subject wise Total vs Distinction Analysis


def distinction():
eng_t=df.Eng.count()
hin_t=df.loc[(df.Hindi>0),'Hindi'].count()
math_t=df.Maths.count()
sci_t=df.Science.count()
sst_t=df.S_Sc.count()
eng_d=0
hin_d=0
math_d=0
sci_d=0
sst_d=0

for i in range(len(df)):
if df.Eng[i]>=75:
eng_d+=1
if df.Hindi[i]>=75:
hin_d+=1
if df.Maths[i]>=75:
math_d+=1
if df.Science[i]>=75:
sci_d+=1
if df.S_Sc[i]>=75:
sst_d+=1
sub_tot=[eng_t,hin_t,math_t,sci_t,sst_t]
sub_dist=[eng_d,hin_d,math_d,sci_d,sst_d]
dist_df=pd.DataFrame({"Total Appear":sub_tot, "Distinction":sub_dist})
dist_df.index=['English','Hindi','Maths','Science','S.Sc']
print(dist_df)
print()
print()
while True:
choice=input("Enter type of chart : L-Line, B-Bar, X-Exit :")
if choice=='L':

dist_df.plot(kind="line",rot=30,linewidth=3,linestyle='dashed',marker='^',markeredgec
olor='r')
elif choice=='B':
dist_df.plot(kind="bar",color=['purple','red'],rot=30)
else:
print("Exiting......")
break
plt.xlabel('Subject ->',color='r',fontsize=12)
plt.ylabel('No.of Students->',color='r',fontsize=12)
gtitle1="RED ROSE SENIOR SECONDARY SCHOOL"+"\nSubject Wise
Distinction Analysis "+session
plt.title(gtitle1,fontsize=16,color='b')
plt.grid()
plt.show()

# Subject wise Total vs Pass Analysis


def passed():
eng_t=df.Eng.count()
hin_t=df.loc[(df.Hindi>0),'Hindi'].count()
math_t=df.Maths.count()
sci_t=df.Science.count()
sst_t=df.S_Sc.count()
eng_p=df.loc[(df.Eng>=33),'Eng'].count()
hin_p=df.loc[(df.Hindi>=33),'Hindi'].count()
math_p=df.loc[(df.Maths>=33),'Maths'].count()
sci_p=df.loc[(df.Science>=33),'Science'].count()
sst_p=df.loc[(df.S_Sc>=33),'S_Sc'].count()
sub_tot=[eng_t,hin_t,math_t,sci_t,sst_t]
sub_pass=[eng_p,hin_p,math_p,sci_p,sst_p]
pass_df=pd.DataFrame({"Total Appear":sub_tot, "Total Pass":sub_pass})
pass_df.index=['English','Hindi','Maths','Science','S.Sc']
print(pass_df)
print()
print()
while True:
choice=input("Enter type of chart : L-Line, B-Bar, X-Exit :")
if choice=='L':

pass_df.plot(kind="line",rot=30,linewidth=3,linestyle='dashed',marker='^',markeredge
color='r')
elif choice=='B':
pass_df.plot(kind="bar",color=['purple','red'],rot=30)
else:
print("Exiting......")
break
plt.xlabel('Subject ->',color='r',fontsize=12)
plt.ylabel('No.of Students->',color='r',fontsize=12)
gtitle1="RED ROSE SENIOR SECONDARY SCHOOL"+"\nSubject Wise Total
vs Pass Analysis "+session
plt.title(gtitle1,fontsize=16,color='b')
plt.grid()
plt.show()

# Subject wise 90% and above Analysis


def ninety_above():
eng_t=df.Eng.count()
hin_t=df.loc[(df.Hindi>0),'Hindi'].count()
math_t=df.Maths.count()
sci_t=df.Science.count()
sst_t=df.S_Sc.count()
eng_90=df.loc[(df.Eng>=90),'Eng'].count()
hin_90=df.loc[(df.Hindi>=90),'Hindi'].count()
math_90=df.loc[(df.Maths>=90),'Maths'].count()
sci_90=df.loc[(df.Science>=90),'Science'].count()
sst_90=df.loc[(df.S_Sc>=90),'S_Sc'].count()

sub_tot=[eng_t,hin_t,math_t,sci_t,sst_t]
sub_ab_90=[eng_90,hin_90,math_90,sci_90,sst_90]
ab_90_df=pd.DataFrame({"Total Appear":sub_tot, "90 & Above":sub_ab_90})
ab_90_df.index=['English','Hindi','Maths','Science','S.Sc']
print(ab_90_df)
print()
print()
while True:
choice=input("Enter type of chart : L-Line, B-Bar, X-Exit :")
if choice=='L':
ab_90_df.plot(kind="line",rot=30,linewidth=3,linestyle='dashed',marker='^',markeredg
ecolor='r')
elif choice=='B':
ab_90_df.plot(kind="bar",color=['purple','red'],rot=30)
else:
print("Exiting......")
break
plt.xlabel('Subject ->',color='r',fontsize=12)
plt.ylabel('No.of Students->',color='r',fontsize=12)
gtitle1="RED ROSE SENIOR SECONDARY SCHOOL"+"\nSubject Wise Total
vs Above 90% Analysis "+session
plt.title(gtitle1,fontsize=16,color='b')
plt.grid()
plt.show()

# Top 10 Students
def top_10():
df_top10=df.sort_values(by='Percent', ascending=False).head(10)
print("----------------------------- TOP 10 STUDENTS (PERCENTAGE WISE) -------
------------------------")
print(sch_code,"-","RED ROSE SENIOR SECONDARY SCHOOL","
Session :",session)
print("----------------------------------------------------------------------------------------------
--------------------------")
print(df_top10[['Name','Percent']])
print()
print()
print("Hit Enter to continue........")
key=input()

# EXECUTING MAIN PROGRAM


menu()
Output Screens

Main Page

Display Result Sheet


Parcentage Range Analysis
Total VS Distinction Analysis
Total Vs Pass Analysis
90% and Above Analysis
Top 10 Students List
BIBLIOGRAPHY

1) Informatics Practices With Python - Class XIIBy : Sumita Arora


2) Informatics Practices With Python - Class XIIBy : Preeti Arora
3) Informatics Practices NCERT Book
4) Website: https://www.w3resource.com
5) www.tutorialspoint.com
6) https://en.wikipedia.org/wiki/E_(mathematical_constant)

********

You might also like