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

Igl

Uploaded by

anujsharma9466
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)
11 views27 pages

Igl

Uploaded by

anujsharma9466
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
You are on page 1/ 27

BAL VIKAS SR. SEC.

SCHOOL
BAHADURGARH

PRACTICAL FILE
ON
COMPUTER SCIENCE
(CODE-083)
SESSION: 2024-2025

SUBMITTED BY SUBMITTED TO
NAME : Pawan TEACHER’S NAME
ROLL NO.
Ms. Renu Ma’am
CLASS : XII-SCIENCE

T.SIGN SCHOOL STAMP P.SIGN


CERTICATE
This is to certify that the project titled, "IGL Bill Generating System" is a
piece of work done by Mr…Pawan….. of class XII Session 2024-25 in
partial fulfilment of CBSE'S AISSCE-2024 and has been carried out under
my supervision and guidance. This report or an identical report on this
topic has not been submitted for any other examination and does not form
a part of any other course undergone by the candidate.

………………………………………………………
Signature of teacher
Name: Mrs. ……
Designation: PGT (COMPUTER SCIENCE)

Place: …………………
Date:
2
ACKNOWLEDGEMENT

I am deeply indebted to my guide Mr…Pawan…… for his valuable


guidance, stimulus and constructive criticism during the whole span of this
project work. I am also grateful to him for his continuous support and
encouragement during the course of present work. I am also grateful to
him as he cleared all my doubts related with MySQL-Python Interface and
Python in particular.
I am thankful to my friends and classmates as they have always helped me
with heart in many ways. This is incomplete unless I say thanks to my
parents, whose important time I used for everything.

……………………………………..
Signature of Student
Name: Pawan
Class: 12th SCIENCE
Place : …………..
Date:

3
CONTENTS

S.NO TOPIC Page no.


1 Introduction 4
2 Table structure 5
3 Table Having records 6
4 Printout of source code 7
5 Printout of sample outputs 15
6 Limitations of projects 24
7 Conclusion 25

1
Table Structure

5
Table Having Records

6
Source Code
import mysql.connector as sql

def insert():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

ch='y';

while ch=='y' or ch=='Y':

cno=int(input("Enter the customer number: "))

name=input("Enter the customer name: ")

mobile=int(input("Enter the mobile :"))

address=input("Enter the address: ")

amount=int(input("Enter the payment amount: "))

refrence_no=input("Enter the refrence no: ")

ca_no=int(input("Enter CA no"))

str="insert into iglbill values({},'{}',{},'{}',{},'{}',{})"

query=(str.format(cno,name,mobile,address,amount,refrence_no,ca_no))

mycur.execute(query)

mydb.commit()

print("\n Record inserted\n")

ch=input("Want to add more records?\n type 'Y' for yes or 'N' for no:")

def edit():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

mycur.execute("select * from iglbill")

print("==================================================\n")

7
print("Before updation\n")

myrec=mycur.fetchall()

for i in myrec:

cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

cno=int(input("Enter the customer number that you want to update: "))

print("Enter the changes that you want\n")

name=input("Enter the customer name: ")

mobile=int(input("Enter the mobile :"))

address=input("Enter the address: ")

amount=int(input("Enter the payment amount: "))

refrence_no=input("Enter the refrence no: ")

ca_no=int(input("Enter CA no"))

str="update iglbill set name='{}',mobile={},address='{}',amount={},refrence_no='{}',ca_no='{}'


where cno={}"

query=str.format(name,mobile,address,amount,refrence_no,ca_no,cno)

mycur.execute(query)

mydb.commit()

mycur.execute("select * from iglbill")

print("========================================\n")

print("After updation \n")

myrec=mycur.fetchall()

for i in myrec:

8
cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

def delete():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

mycur.execute("select * from iglbill")

print("======================================\n")

print("Before deletion\n")

myrec=mycur.fetchall()

for i in myrec:

cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

9
cno=int(input("Enter the customer number that you want to delete: "))

str="delete from iglbill where cno={}"

query=str.format(cno)

mycur.execute(query)

mydb.commit()

mycur.execute("select * from iglbill")

print("==========================================\n")

print("After deletion \n")

myrec=mycur.fetchall()

for i in myrec:

cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

def display():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

mycur.execute("select * from iglbill")

print("==========================================\n")

myrec=mycur.fetchall()

for i in myrec:

10
cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

def search():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

cno=int(input("Enter customer no whose record you want to search: "))

str="select * from iglbill where cno={}"

query=str.format(cno)

mycur.execute(query)

print("===========================================\n")

myrec=mycur.fetchall()

for i in myrec:

cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(cno," ",name," ",mobile," ",address," ",amount," ",refrence_no," ",ca_no)

11
def generate():

mydb=sql.connect(host="localhost",user="root",passwd="1234",database="mproject")

mycur=mydb.cursor()

cno=int(input("Enter customer no whose record you want to generate: "))

str="select * from iglbill where cno={}"

query=str.format(cno)

mycur.execute(query)

myrec=mycur.fetchall()

for i in myrec:

cno=i[0]

name=i[1]

mobile=i[2]

address=i[3]

amount=i[4]

refrence_no=i[5]

ca_no=i[6]

print(" INDRAPRASTHA GAS LIMITED\n")

print(" DELHI-110009\n")

print(" Mobile: 9873645389\n")

print(" Email: [email protected]\n")

print(" Date:30/08/2020\n")

print("======================================================\n")

print("CUSTOMER INFO:")

print("Customer No: ",cno," \t\t\tName: ",name,"\n")

12
print("Address: ",address," tMobile: ",mobile,"\n")

print(" CA NO: ",ca_no,"\n")

print(" Reference no:",refrence_no,"\n")

print("=======================================================\n")

print("CHARGES: ")

print("Amount:",amount," inclusive of GST")

print("GST: (18%)")

ch='y'

while ch=='y' or ch=='Y':

print("MAIN MENU")

print("Press 1 for Inserting data")

print("Press 2 for Editing data")

print("Press 3 for Deleting data")

print("Press 4 for Displaying data")

print("Press 5 for Searching data")

print("Press 6 for Generating data")

print("Press 7 to quit")

ch=int(input("Enter choice: "))

if ch==1:

insert()

elif ch==2:

edit()

elif ch==3:

delete()

elif ch==4:

display()

elif ch==5:

search()

13
elif ch==6:

generate()

elif ch==7:

break

print("====================================\n")

print("Want to see Main Menu?")

ch=input("Y for yes, N for no: ")

14
Output
Insert

15
Edit

16
17
Delete

18
Display

19
Search

20
Generate

21
22
To Quit

23
LIMITATION OF THE PROJECT

• It does not have a proper GUI ( graphical user interface is a form of user
interface that allows users to interact with electronic devices through
graphical icons and audio indicator such as primary notation, instead of
text-based user interfaces, typed command labels or text navigation.)

• Requires a proper knowledge to run the project.

• Cannot be used online.

24
CONCLUSIONS

“IGL Bill generation” has been made to reduce the annual work and
with the help of the project every work is being processed in
accurate manner. Bill generation of a customer is being calculated itself by
the computer.

25

You might also like