IP PROJECT Important
IP PROJECT Important
1. ____________
2._____________
Certificate
(Internal) (External)
S.S.Jassal
Coding of my project
import time as tt
import pandas as pd
import matplotlib.pyplot as plt
def function1() :
#Reading values from CSV data file and Printing individual
Marks Sheet
data = pd.read_csv("c:\python\class.csv")
#Finding out total no of records
ln=int(len(data.index))
rn=(data["Rno"])
nm=(data["Name"])
english=(data["Eng"])
hindi=(data["Hin"])
inpr =(data["Ip"])
tot=(data["Total"])
for a in range(ln):
print ("* * * Christ Church Boys' Senior Secondary
School")
print (' J A B A L P U R ')
print ('---------------------------------------------------')
print ('Roll Number :',rn[a])
print ('Name of Student :',nm[a])
print ('---------------------------------------------------')
print (' ')
print ('English = ',english[a])
print ('Accounts = ',hindi[a])
print ('Inf.Pract. = ',inpr[a])
print ("=============================")
print ("Total marks = ",tot[a])
av=tot[a]/3
if ( av>=60):
print('Result : First Division')
if (av<60) and (av>=50) :
print('Result : Second Division ')
if (av<50) and (av>=40):
print('Result : Third division')
if (av<40) :
print('Result : Fail ')
print ("=============================")
tt.sleep(1.5)
print ("Thanks for using my application")
def function2() :
# Writing a new record in CSV file
data = pd.read_csv("c:\python\class.csv")
Rno=int(input("Enter Roll number "))
Name=input("Enter name of a Student")
Eng=int(input("Enter English Marks"))
Hin=int(input("Enter Hindi Marks"))
Ip=int(input("Enter IP marks"))
Tot=int(Eng+Hin+Ip)
data.loc[len(data.index)]=[Rno,Name,Eng,Hin,Ip,Tot]
#print(data)
data.to_csv("c:\python\class.csv", index= False)
def function3():
#Finding out no of records in a Data Frame
data = pd.read_csv("c:\python\class.csv")
ln=int(len(data.index))
print("Total number of records in CSV data file = ",ln)
def function4():
# Printing a summary report of a class
data = pd.read_csv("c:\python\class.csv")
ln=int(len(data.index))
rn=(data["Rno"])
nm=(data["Name"])
english=(data["Eng"])
hindi=(data["Hin"])
inpr =(data["Ip"])
tot=(data["Total"])
print ("* * * Christ Church Boys' Senior Secondary
School")
print (' J A B A L P U R ')
print ('---------------------------------------------------')
for a in range(ln):
print(rn[a],nm[a],english[a],hindi[a],inpr[a],tot[a])
print('------------------------------------------------')
print('Report Generated by S S Jassal ...')
print('=============================================
====')
def function5():
#Displaying student data through Bar Graph
data = pd.read_csv("c:\python\class.csv")
x=(data["Name"])
y=(data["Total"])
plt.bar(x,y, color='orange',label='English')
plt.xlabel('Students')
plt.ylabel('Max.Marks 300')
plt.title('Student progress analysis')
plt.legend()
plt.show()
def function6():
data = pd.read_csv("c:\python\
class.csv",index_col="Rno")
print(data)
roll=int(input("Enter roll number to delete"))
data.drop([roll],inplace=True)
print(data)
data.to_csv("c:\python\class.csv")
1. Practical File
2. Project Work
1). Write at least 15 programs of your choice, which should include the
following 10 programs also. (List of program is given at the bottom).
On Left hand side page , write the Question and the python program and on the
right hand side make the output . (if you run the program , how it looks)
All the programs are supposed to be trial and tested personally by you.
2). Create four different data table along with 10 records each and write
different queries and commands 10 each table . You are suppose to cover all the
major commands of My SQL in these total 40 commands. You have to write the
output after each command.
List of Programs:
You have to write the following programs using Data through Lists / Series /
Dictionary /Data Frame / NumPy and CSV files.
1). Write a program to give data of 5 students ( roll number, Name and marks of
4 different subjects) and make a marks sheet of individual student . (Design format
of your own choice)
2). Write a program to give id no name and basic salary of an employee and
design a Salary statement in which you have to give allowances such as DA, TA
and HRA and reduce Deductions such as PF and LIC to find out the Payable
salary.
3). Write a program which should display a menu in which it should ask for
different patterns of stars to be printed on the screen using Nested For statement .
Whichever option user selects , computer should display that pattern. (Give option
for any 3 type of patterns).
5). Create a Data Frame for quarterly sales in which each row should contain Item
Category, item Name and Expenditure. Group the rows by the Category and print
the total expenditure per category.
6). Write a program to Import a CSV file and display it through a Data Frame on
the Screen.
7). Given the School result data, analyse the performance of the students on
different parameters through Bar Graph.
8). Create any Data Frame and display all the different characteristics of a Line
graph like Legends , titles etc.
9). Take data of your own choice and display the different types of charts
depending on the user’s choice.
10). Create a Data frame with Rno, Name and marks of 2 different subjects and
create a new column in which it should generate total marks and finally display all
the things on the screen.
Project Work
Lengthy Menu Driven Program of Python
Proper documentation
Group activity
To be submitted individually
Printed form