0% found this document useful (0 votes)
12 views

computer project

computer document

Uploaded by

dsree8820
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

computer project

computer document

Uploaded by

dsree8820
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

ELECTRICITY BILLING SYSTEM

PROJECT REPORT

Submitted by:
Nadish.L

Grade: 12th

SUGUNA PIP SCHOOL


COIMBATORE-641017
2021-2022
DECLARATION

I, ______________________________, of class XII, hereby declare that the

Project entitled

“_______________________________________________________________

__________” submitted to SUGUNA PIP SCHOOL: (Affiliation number –

1930213), Nehru Nagar, Kalapatty Road, Coimbatore, Tamil Nadu – 641014.

Regard to the class XII Senior Secondary Examination for the CBSE Board, is

accord of original project work done by me under the guidance and supervision

of ALLPIOUS R, Faculty in Information technology department, Suguna PIP

School, further certify that

I. The work contained in the report is original and is done under the

general supervision of my Faculty.

II. The work has not been submitted to any other Institution/Board for

class XII Senior Secondary Examination, CBSE Board.

Name: ________________

Roll No.: _____________


ACKNOWLEDGEMENT

I thank my family for supporting me to complete my


project successfully. I would like to express my deep
sense of gratitude to my teacher, ALLPIOUS R, Faculty
in Information technology department, Suguna PIP
School, Coimbatore, for her invaluable support and
advice which helped me to complete this project. I am
honoured to be doing this under her supervision.

I extend my gratitude to MR. POOVANNAN, Principal


and all the staff members for the support. Finally, I
heartfully thank all my dear friends and family
members, who have extended their support and
kindness intimately.
CONTENTS

S.no TOPIC

1. Synopsis

2. System Requirement

3. Introduction to Python

Program code
4.

Sample Output
5.

Conclusion
6.

Bibliography
7.
SYNOPSIS

This project has been developed with the complexities involved in manual
preparation of the “ELECTRICITY BILLING SYSTEM ”can be overcome
by applying the computer. The computerized “ELECTRICITY BILLING
SYSTEM” has been developed in The Sugana PIP School,coimbatore, the
computerized Electricity Billing Management System is user friendly and it
posses many features. The test data have proved that the result
generated by the software are accurate and has been tested with test
data.
This system is divided into five modules :-
➢ The first module deals with creating an EBS account.
➢ The second module deals with registering as a new customer.
➢ The third module deals with deleting existing EBS account.
➢ The fourth module deals with viewing the status of the bill and
payment of the bill.
➢ The fifth module deals with displaying the customer details.
SYSTEM REQUIREMENTS

Recommended System Requirements Processors:

Intel® Core™ i3 processor 4300M at 2.60 GHz. Disk space: 2 to 4 GB.

Operating systems: Windows® 10, MACOS, and UBUNTU. Python

Versions: 3.X.X or Higher.

Minimum System Requirements Processors:

Intel Atom® processor or Intel® Core™ i3 processor. Disk space: 1 GB.

Operating systems: Windows 7 or later, MACOS, and UBUNTU. Python

Versions: 2.7.X, 3.6.X.


Introduction to Python
Python is a popular programming language. It was created by Guido van
Rossum, and released in 1991.

It is used for:

• web development (server-side),


• software development,
• mathematics,
• system scripting.

What can Python do?


• Python can be used on a server to create web applications.
• Python can be used alongside software to create workflows.
• Python can connect to database systems. It can also read and modify
files.
• Python can be used to handle big data and perform complex
mathematics.
• Python can be used for rapid prototyping, or for production-ready
software development.

Why Python?
• Python works on different platforms (Windows, Mac, Linux, Raspberry
Pi, etc).
• Python has a simple syntax similar to the English language.
• Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.
• Python runs on an interpreter system, meaning that code can be
executed as soon as it is written. This means that prototyping can be
very quick.
• Python can be treated in a procedural way, an object-oriented way or a
functional way.
ELECTRICITY BILLING SYSTEM

import mysql.connector as sql,random,datetime as dt


conn=sql.connect(host='localhost',user='root',passwd='c
omputerlab',database='EBS')
if conn.is_connected():
print("successfully connected")
c='YES' or "yes" or 'Yes'
V='YES' or "yes" or 'Yes'
c1=conn.cursor()
while c=='YES' or "yes" or 'Yes':
print('**********WELCOME TO ELECTRICITY BILLING
SYSTEM************')
print('1.NEW USER')
print('2.EXISTING USER')
print('3.EXIT')
choice1=int(input('ENTER YOUR CHOICE:'))
if choice1==1:
username=input("Enter your username:")
password=input("Enter your password:")
confirmpasswd=input("Confirm your password:")
if password==confirmpasswd:
info1="insert into newuser
values('{}','{}','{}')".format(username,password,confir
mpasswd)
c1.execute(info1)
conn.commit()
c=input("do you want to continue?(yes or
no)")
else:
print('your confirm password is
incorrect')
print('Try again')
c=input("do you want to continue?(yes or
no)")
elif choice1==2:
username=input('Enter your username:')
password=input('Enter your password:')
info2="select * from newuser where
username='{}' and
password='{}'".format(username,password)
c1.execute(info2)
data=c1.fetchall()
while V=='YES' or "yes" or 'Yes':
if any(data):
print('**********WELCOME TO ELECTRICITY
BILLING SYSTEM************')
print("1.ACCOUNT SETTINGS")
print("2.TRANSACTION")
print("3.VIEW CUSTOMER DETAILS")
print('4.EXIT')
choice2=int(input('ENTER YOUR CHOICE'))
if choice2==1:
print('1.NEW CUSTOMER')
print('2.DELETE EXISTING ACCOUNT')
choice12=int(input('ENTER YOUR
CHOICE:'))
if choice12==1:

accountno=random.randrange(1000000,9999999,10)
print("your accountno
is",accountno)
boxid=input("enter your mete
box ID:")
bankname=input('Enter your BANK
NAME :')
bankbranch=input('Enter your
BANK BRANCH :')
name=input('Enter your name
:')
address=input('Enter your
address :')
areacode=int(input('Enter your
area PIN CODE :'))
phoneno=int(input('Enter your
PHONE NUMBER :'))
email=input('Enter your email
:')
info2="insert
intoAddNewCustomer
values({},'{}','{}','{}','{}',{},{},'{}','{}')".format(
accountno,bankname,bankbranch,name,address,areacode,pho
neno,email,boxid)
c1.execute(info2)
conn.commit()
V=input("do you want to
continue?(yes or no)")
if V=='yes':
continue
else:
break
elif choice12==2:
acc=input("ENTER YOUR ACCOUNT
NUMBER:")
use=input("ENTER YOUR
USERNAME:")
info6=c1.execute("delete from
Transaction where accountno='{}'".format(acc))
info7=c1.execute("delete from
AddNewCustomer where accountno='{}'".format(acc))
info8=c1.execute("delete from
newuser where username='{}'".format(use))
c1.execute(info6)
c1.execute(info7)
c1.execute(info8)
conn.commit()
print("THANK YOU FOR USING OUR
SOFTWARE,YOUR ACCOUNT IS SUCCESFULLY DELETED")
V=input("do you want to
continue?(yes or no)")
if V=='yes':
continue
else:
break

elif choice2==2:
accountno=int(input('Enter your
account number :'))
info10="select * from Transaction
where accountno="+str(accountno)
c1.execute(info10)
data3=c1.fetchall()
for row in data3:
paid=row[6]
if paid=='yes':
print('you have already paid
the bill')
break
else:
unit=random.randint(0,101)
print('Dear customer, you have
used ',unit,'units of electricity.')
print('One unit of curent is
150 ruppees')
amount=150*unit
toda=dt.date.today()
deadline=dt.date(2020,1,30)
if deadline<toda:
fine=(toda-deadline)*30
totamt=amount+fine
print('you have dealyed for
',toda-deadline,'days.The fine per day is 30 rupees.')
GST=(15/100)*totamt
totalamt=totamt+GST
print('Pleae payup
',totalamt,'rupees inclding GST')
p=input("Please Enter YES
to transact")
if p=="YES"or 'Yes'or'yes':
print("Transaction
successful")
print("You have paid
the bill")
else:
print('plz pay the bill
sooner')
else:
totamt=0
GST=(15/100)*amount
totalamt=amount+GST
print('Pleae payup
',totalamt,'rupees inclding GST')
p=input("Please Enter YES
to transact")
if p=="YES":
print("Transaction
successful")
print("You have paid
the bill")
else:
print('plz pay the bill
sooner')
info3="insert into Transaction
values({},{},'{}',{},{},{},'{}')".format(accountno,unit
,toda,totamt,GST,totalamt,p)
c1.execute(info3)
conn.commit()
V=input("do you want to
continue?(yes or no)")
if V=='yes':
continue
else:
break
elif choice2==3:

accountno=int(input('Enter your
account number :'))
info4="select * from AddNewCustomer
where accountno=" + str(accountno)
c1.execute(info4)
data1=c1.fetchall()
for row in data1:
print(" Account Number: ",
row[0])
print("bankname:",row[1])
print("bankbranch:",row[2])
print("Person name:",row[3])
print("Your meter device
ID=",row[8])
print("Residential
address:",row[4])
print("area code:",row[5])
print("phone number:",row[6])
print("email:",row[7])
info5="select * from
Transaction where accountno=" + str(accountno)
c1.execute(info5)
data2=c1.fetchall()
for row in data2:

print(" Unit : ",row[1])


print(" paid on:",row[2])
print("amount to be paid
without GST:",row[3])
print("GST=",row[4])
print("amount to be paid
including GST:",row[5])
V=input("do you want to
continue?(yes or no)")
if V=='yes':
continue
else:
break
elif choice2==4:
info9="select accountno,totalamt
from Transaction"
c1.execute(info9)
L1,L2,=[],[]
for i in c1.fetchall():
L1.append(i[0])
L2.append(i[1])
plt.plot(L1,L2)
plt.title("GRAPH")
plt.show()
V=input("do you want to
continue?(yes or no)")
if V=='yes':
continue
else:
break
elif choice2==5:
print(
"THANK YOU!!!! VISIT AGAIN!!!!")
break
c='yes'

else:
print('username / password is
incorrect')
break
c=input("do you want to try again?(yes
or no)")

else:
print(
"THANK YOU!!!! VISIT AGAIN!!!!")
V='no'
elif choice1==3:
print( "THANK
YOU!!!! VISIT AGAIN!!!!")
c='no'
break
else:
print("invalid choice")
c=input("do you want to try again?(yes or no)")
else:
print( "THANK
YOU!!!! VISIT AGAIN!!!!")

c='no'
SAMPLE OUTPUT

Output 1:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice : 1
Enter your Username : abcd
Enter your Password: 1234
Confirm your Password: 1234
Do you want to continue? (yes or no): yes
Output 2:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice : 2
Enter your Username: abcd
Enter your Password: 1234
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.ACCOUNT SETTINGS
2.TRANSACTION
3.VIEW CUSTOMER DETAILS
4.EXIT
Enter your Choice: 1
1.NEW CUSTOMER
2.DELETE EXISTING ACCOUNT
Enter your Choice: 1
Your account no. is 7800180
Enter your meter box ID: 001
your Bank Name : HDFC
Enter your Bank Branch : Chennai
Enter your Name : xyz
Enter your Address : 13, Main road, Chennai
Enter your Pincode : 638452
Enter your Phone number :9876543210
Enter your Email : [email protected]
Output 3:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice: 2
Enter your Username: abcd
Enter your Password: 1234
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.ACCOUNT SETTINGS
2.TRANSACTION
3.VIEW CUSTOMER DETAILS
4.EXIT
Enter your Choice: 1
1.NEW CUSTOMER
2.DELETE EXISTING ACCOUNT
Enter your Choice :2
Enter your Account Number : 7800180
Enter your Username: abcd
THANK YOU FOR USING OUR SOFTWARE YOUR ACCOUNT IS
SUCCESFULLY DELETED
Output 4:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice: 2
Enter your Username : pqrs
Enter your Password: 7890
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.ACCOUNT SETTINGS
2.TRANSACTION
3.VIEW CUSTOMER DETAILS
4.EXIT
Enter your Choice: 2
Enter your Account Number : 7800180
Dear customer, you have used 24 units of electricity.
Please
One unit of current is 150 rupees
pay 4140.0 rupees including GST
Please Enter YES to transact: YES
Transaction Successful
You have paid the bill
Do you want to continue?(yes or no): yes
Output 5:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice :2
Enter your Username: efgh
Enter your Password: efgh
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.ACCOUNT SETTINGS
2.TRANSACTION
3.VIEW CUSTOMER DETAILS
4.EXIT
Enter your Choice: 3
Enter your Account Number : 4615650
Account Number: 4615650
Bank Name: ICICI
Bank Branch: Erode
Person name: efgh
Your meter device ID=0001
Residential address: 11,RK Nagar, Erode
Pincode: 638057
Phone number: 9486612370
Email: [email protected]
Do you want to continue?(yes or no): no
Output 6:
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
2022-01-29 19:26:05.331171
1.NEW USER
2.EXISTING USER
3.EXIT
Enter your Choice: 2
Enter your Username : efgh
Enter your Password : efgh
***********WELCOME TO ELECTRICITY BILLING SYSTEM************
1.ACCOUNT SETTINGS
2.TRANSACTION
3.VIEW CUSTOMER DETAILS
4.EXIT
Enter your Choice: 4
THANK YOU!!!! VISIT AGAIN!!!
Conclusion

This project has been developed with the complexities involved in manual
preparation of the “ELECTRICITY BILLING SYSTEM ”can be overcome
by applying the computer. The computerized “ELECTRICITY BILLING
SYSTEM” has been developed in The Sugana PIP School,coimbatore, the
computerized Electricity Billing Management System is user friendly and it
posses many features. The test data have proved that the result
generated by the software are accurate and has been tested with test
data.
BIBLIOGRAPHY

Source: Internet
➢ www.google.com
➢ www.icbse.com
➢ cbse.nic.in/curric~ 1/xii06/compscie.pdf
➢ www.quora.com
BOOKS REFERRED
➢ Computer Science with Python -Class XII (By: Sumita Arora)

You might also like