A Project Report
On
MTNL CALLS AND BILL
GENERATING SYSYTEM
BRAHMA SHAKTI PUBLIC SCHOOL
Under The Supervision of Submitted By
Name - MR. Brijesh Kr. Dubey NAME - NIKHIL DHIRYAN
CLASS - 12%
ROLL NO-
Informatics practices (065)CONTENTS
Topic Name
Certificate
Acknowledgement
Introduction
Database Table Structure
Database Having 10 Records
Source code
Sample Output
Limitation of the Project
ConclusionCERTIFICATE
This is to certify that the project titled, “MTNL CALLS AND BILL
GENERATING SYSYTEM" is a piece of work done by NIKHIL
DHIRYAN of class XII Session 2019-20 in Partial fulfilment of C
AISSCE-2020 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/Guide
Name: MR. Brijesh Kr. Dubey
Designation: PGT (Computer Science)
Date: -/ ~ / 2019ACKNOWLEDGEMENT
Iam deeply indebted to my guide MR. Brijesh Kr. Dubey for his valuable
guidance, stimulus and constructive criticism during the whole span of
this project work, Iam also grateful to him for his continuous support and
encouragement during the Course of present work. | am also grateful to
himas he cleared all my doubts related with MySQL-Python Interface and
Python in particular.
Iam 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: NIKHIL DHIRYAN
Class & Section XII
Date: --/ ~/ 2019INTRODUCTION
The project is based on MINL CALLS AND BILL GENERATING
SYSYTEM. This project is developed on python by interfacing it with
MySQL. This system can insert records, update records, delete records,
display records, and generate records, i.e. of a particular person we want.
Name of databases: Project
Name of table: Mtn1DATABASE TABLE STRUCTURE
int(11)
varchar(3@) | NO
bigint(11) | NO
Address | char(15) | YES
email varchar(3@) | YES
no_calls | int(11)DATABASE HAVING 10 RECORDS
‘Aman
Heitik
Nishant Kaushik
Harsh
Abhishek
Manav
Harshita
Deepak
Arjun
8855236654,
8877986985,
12800873871
788521456
3899865985,
9877458986
7755236541
7745852852
8877986958,
Gtb Nagar
Burard
Burari
Ashok vihar
Vijay Nagar
Sant Nagar
Muherjee Nagar
Kalkaji
Gurgaon
| no_calls
aman@gmail.com |
hritik@gmail.com |
nishant@yahoo.com |
harsh@gnail.com |
abhishek@gnail.com |
manav@gnail.com |
harshite@gmail.com |
deepak@gmail.com |
arjun@gmail.com |SOURCE CODE
import mysql.connector
def addQ):
mydb=mysql.connector.connect(host="localhost" user="root" pas
swd="mysql",database="project")
mycur=mydb.cursor( )
print("Enter The Values: ")
print(’
cno=int(input("Customer no: "))
cname =input("Customer name: ")
mobile=int(input("Phone no: "))
address=input("Address: ")
email=input("Email id: ")no_calls=int(input("No. of calls: "))
str="INSERT INTO mtn! VALUES((,'0',0,"0)'("
query=(str.format(cno,cname,mobile,address,email,no_calls))
mycur.execute(query)
mydb.commit()
print("Rocord inserted")
ch=input("Want to Add more records(y/n): ")
print(
def search():
mydb=mysql.connector.connect(host="localhost",user="root" pas
swd="mysql",database="project")
mycur=mydb.cursor( )
cno=int(input("Enter The Customer no: "))str="Select * from mtnl where cno={}"
query=str.format(cno)
print(
mycur.execute(query)
myrec=mycur-fetchall()
for x in myrec:
cno=x[0]
cname=x(1]
mobile=x[2]
Address=x[3]
email=x[4]
no_calls=x[5]
print(cno," "name," "mobile," "Address," ",email,"
"no _calls)def display():
mydb=mysql.connector.connect(host="localhost",user="root",pas
swd="mysql",database="project")
mycur=mydb.cursor()
mycur.execute("Select * from mtn!")
print(
myrec=mycur-fetchall()
for x in myrec:
cno=x[0]
cname=x(1]
mobile=x[2]
Address=x[3]
email=x[4]
no_calls=x{5]print(cno," ",cname," ",mobile," ",Address," ",email,”
"no_calls)
def edit:
mydb=mysql.connector.connect(host="localhost",user="root",pas
swd="mysql",database="project")
mycur=mydb.cursor( )
mycur.execute("Select * from mtn!")
print(
print('Before Updation\n’)
myrec=mycur-fetchall()
for x in myrec:
cno=x{0]
cname=x(1]
mobile=x[2]Address=x[3]
email=x[4]
no_calls=x[5]
print(cno," ",cname," "mobile," ",Address," ",email,”"
"no _calls)
cno=int(input("Enter The Customer no wanted to Update: "))
print("Enter the changes you want\n")
cname =input("Enter The Customer name: ")
mobile=int(input("Enter The Phone no: "))
address=input("Enter The address: ")
email=input("Enter The Email id: ")
no_calls=int(input("Enter The No. of calls: "))
str="Update mtnl set
cname='{}'mobile={),address='{}',email="{}' no_calls=(} where
cno={}"
query=str.format(cname,mobile,address,email,no_calls,cno)mycur.execute(query)
mydb.commit()
mycur.execute("Select * from mtn")
print(
print(‘After Updation\n')
myrec=mycur.fetchall()
for x in myrec:
cno=x{0]
cname=x(1]
mobile=x[2]
Address=x[3]
email=x[4]
no_calls=x[5]print(cno," ",cname," ",mobile,” "Address," "
"no_calls)
def delete():
mydb=mysql.connector.connect(host="localhost",user="root",pas
swd="mysql",database="project")
mycur=mydb.cursor( )
mycur.execute("Select * from mtn!")
print(
print('Before Deletion’)
print(‘=
)
myrec=mycur.fetchall()for x in myrec:
cno=x{0]
cname=x(1]
mobile=x[2]
Address=x[3]
email=x[4]
no_calls=x[5]
print(cno," ",;cname," ",mobile," ",Address," ",email,"
"no_calls)
cno=int(input("Enter The Customer no: "))
str="Delete from mtn! where cno={}"
query=str.format(cno)
mycur.execute(query)
mydb.commit()mycur.execute(query)
print("record deleted")
mycur.execute(query)
mydb.commit()
mycur.execute("Select * from mtn!")
print(
print(‘After Deletion’)
print('=
myrec=mycur-fetchall()
for x in myrec:
cno=x[0]
cname=x(1]
mobile=x[2]
Address=x[3]email=x[4]
no_calls=x{5]
print(cno," ",cname," ",mobile,” ",Address," ",email,”
"no_calls)
def generate():
mydb=mysql.connector.connect(host="localhost" user="root",pas
swd="mysql",database="project")
mycur=mydb.cursor( )
cno=int(input("Enter The Customer no: "))
str="Select cno,cname,mobile,address,email,no_calls from mtnl
where cno={}"
query=str.format(cno)mycur.execute(query)
myrec=mycur.fetchall()
for x in myrec:
cno=x{0]
cname=x(1]
mobile=x[2]
Address=x[3]
email=x[4]
no_calls=x[5]
a=x{5]
if a<=100:
amt=200
elifa<=150:
amt=200 +0.60*(a-100)
elif a<=200:
amt=200 + 0.6050 +0.50*(a-150)
elifa>200:amt=200 + 0.60*50 + 0.50*50 +0.40*(a-200)
Tax=round(amt*0.10,2)
Net=amt-Tax
print("<= Tyagi Telecom
>")
print("M:- 011 563287 Branch:- Gtb
Nagar")
print("Customer no: ",cno)
print("Customer name: ",cname)print("Phone no : ",mobile)
print("Address: ",Address)
print("Email Id : "email)
print("No. of Calls: ",;no_calls)
print(’
‘)
print("Your bill is Rs. \t",amt)
print("Gst: ",Tax)
print(’
J
print("Net Amt:Tyagi Telecom
print(”CHOICES")
print("1.To ADD New Record")
print("2.To Search a Record")
print("3.To Update the Record")
print("4.To Delete the Record")
print("5.To View all the Record")print("6.To Generate the Report\n")
print('
ch=int(input("Enter the choice: "))
if ch==1:
addQ)
elif ch==2:
search()
elif ch==3:
edit()
elif ch==4:
delete()
elif ch==5:
display()
elif ch==6:
generate()
print(’\n\n -')
ch=input("Want to See Main Menu(y/n): ")SCREEN SHOTSTO GENERATE THE REPORT
Tyagi Telecom
CHOICES
1.To ADD New Record
2.To Search a Record
3.To Update the Record
4.To Delete the Record
5,To View all the Record
6.To Generate the Report
Enter the choice: 6
Enter The Customer no: 2
Tyagi Telecom
M:- 011 563287 Branch:- Gtb Nagar
Customer ni
Customer name: Hriti
Phone no: 8877986985
Address: Burari
Email Id: hritik@gmail.com
No. of Calls: 560
Your bill is Rs.LIMITATIONS
. Due to failure of electricity, no work can be proceeds
. Does Contain any Proper GUI.
. This project does not contain any details of employee's.
. Can't Work onlineCONCLUSIONS
MTNL CALLS AND BILL GENERATING SYSYTEM has been
prepared to reduce the manual work And with the help of this project
every work is been processed through ‘PYTHON’ and ‘MYSQL’.
This project is developed and designed to achieve maximum. Efficiency
and reduces the time taken to handle the pay slip system and booking
Activity.
It also reduces time taken for calculations and for storing data.