Professional Documents
Culture Documents
Date: 6-12-2023
Place: Bangalore
ACKNOWLEDGEMENT
I take this opportunity to express my profound sense of gratitude and respect to all those who
helped me throughout this venture.
I express sincere thanks to Mrs. Archana Vishwanath, Director of our school for their
unwavering support and encouragement throughout the project. Their guidance has been
instrumental in the project's success. I am grateful for the opportunity to learn and grow
under their leadership.
I owe my regards to Mrs. Jolly Joesph, Principal of our School for her cooperation and
valuable support and for giving us the opportunity to undertake this project work and
providing the necessary infrastructure.
I would like to express my heartfelt thanks to my revered teacher Ms. Sheethal Ravindran for
her valuable guidance, encouragement, and support throughout this project. This project is
her visualization and owes a lot of its functionality to her.
Last but not least, I owe my overwhelming gratitude to my family and friends who gave me
constant support and motivation to continue with this endeavor.
CONTENT
4
1. Introduction
7
2. System requirements
9
3. Source code
17
5. Output
20
6. Conclusion
21
7. bibliography
INTRODUCTION
1. Poor billing and collection practices primarily emanate from the lack of willingness of
the service provider to accurately charge for services being delivered and the lack of a
political will to set tariffs that would allow for recovering the costs incurred in
supplying the service.
2. Most service providers do not have well-defined and proper computerized or
automated systems to maintain financial records for gas billing.
3. The manual process of billing bring about arguments between customers and service
providers,
4. there is no adequate record management system to aid in the accurate computation
and updating of gas bill records.
1. To design a database system that will help maintain record of customers’ gas bill
2. To implement a system that will accurately compute the gas bill of customers.
3. To design a system that will out-perform the manual way of recording and computing
the gas bill of customers
4. To design a system to facilitate easy updating of gas bill records and presentation of
gas bill reports.
SOFTWARE REQUIREMENTS
Python: Python is a high-level, versatile programming language that is easy to learn and
understand. It is extensively used in automation, data science, and web development and
supports a number of programming paradigms. Python's popularity can be attributed to its
cross-platform interoperability, large standard library, and dynamic typing.
MySQL: One popular open-source relational database management system that is well-
known for its dependability and efficiency . MySQL effectively administers and works with
relational databases through SQL. It has ACID features for transactional integrity and is
commonly used in online applications for data retrieval and storage.
Integration of MySQL and Python: The mysql-connector-python library makes it easier to
integrate MySQL and Python, which fosters a strong collaborative environment for
developing scalable, data-driven applications. With MySQL's effective database management
and Python's expressive features, developers can work together seamlessly. This integration
is highly valued for its adaptability, making it a top option across a variety of sectors needing
a combination of a flexible programming language and a reliable relational database system.
It is perfect for dynamic data scenarios like web apps and analytics
Modules
Mysql.connector: The mysql.connector module is a Python driver for MySQL databases,
facilitating communication between Python applications and MySQL servers. With this
module, developers can perform various database operations such as connecting to a MySQL
server, executing SQL queries, and managing transactions. It provides a straightforward and
efficient interface for interacting with MySQL databases in Python programs. To use it, you
need to install the module first using the pip install mysql-connector-python command.
Random: The random module in Python provides tools for generating pseudorandom
numbers. It includes functions for randomizing sequences, choosing elements randomly, and
setting seed values for reproducibility. Developers often leverage this module for tasks like
shuffling lists or creating unpredictable behavior in their programs. The random module is
part of Python's standard library.
Datetime: The datetime module in Python provides classes for working with dates and times.
Developers can perform operations such as formatting dates, calculating time differences, and
extracting specific components like year, month, or day. This module is essential for working
with temporal data and is part of Python's standard library. It offers a versatile and convenient
interface for manipulating and representing dates and times in Python programs.
HARDWARE REQUIREMENTS
print("_____________________________________________________________________
__________")
conn.commit()
continue
elif choice==2:
mycursor.execute("select * from gasin")
re=mycursor.fetchall()
print("YOUR RESULT IS ")
for x in re:
print(x)
print("_____________________________________________________________________
__________")
print("
")
print("
")
continue
elif choice == 3:
customer_name=input("ENTER THE NAME OF CUSTOMER:")
import datetime
v_date=datetime.datetime.now()
date = v_date
print("the date & time is:",v_date)
print("CHOOSE A CHOICE FROM THE FOLLOWING AS PER THE GAS
IS BOUGHT BY THE CUSTOMER:")
print("1. C N G ......Rs.75/l")
print("2.L P G .......Rs.80/l")
print("3.both LPG.....Rs.75/l & CNG.... Rs.80/l")
print("
")
ch=int(input("enter your choice:"))
print("
")
print("
")
if ch==1:
cng=int(input("enter the quantity bought:"))
amount= 75*cng
print("THE AMOUNT TO BE PAID IS :",amount)
mycursor.execute("update gasin set v_cng='cng',v_amtobe_paid='amont'
where v_customer ='customer_name'")
cho=int(input("if transaction is to be done through the credit amount enter
1:"))
if cho==1:
print(v_credit)
remaining=v_credit-amount
mycursor.execute ("update gasin set v_credit='remaining',v_date='date'
where v_customer='customer_name'")
print("your record is updated")
else:
print("INVALID CODE")
if ch==2:
lpg=int(input("enter the amount bought by the customer:"))
pay = 80*lpg
print("the amount to be is: ",pay)
mycursor.execute("update gasin set v_lpg='lpg',v_amtobe_paid='pay' where
v_customer='customer_name'")
print("your record is updated")
choo=int(input("if transaction is to be done through the credit amount enter
1:"))
if choo==1:
remain=v_credit-pay
mycursor.execute("update gasin set v_credit='remain',v_date='date'where
v_customer ='customer_name'")
print("your record is updated")
print("
")
print("
")
if ch==3:
lpgas=int(input("enter the amount of LPG GAS bought:"))
cngas=int(input("enter the amount of CNG GAS bought:"))
total=80*lpgas+75*cngas
print("the amount to be is: ",total)
mycursor.execute("update gasin set
v_lpg='lpgas',v_cng='cngas',v_amtobe_paid='total' where v_customer='customer_name'")
print("your record is updated")
if chio==1:
remaind=v_credit-total
mycursor.execute("update gasin set
v_credit='remaind',v_date='date'where v_customer ='customer_name'")
else:
print ("<<<<<< .............IT IS INVALID CODE..........>>>>>>>>>>>")
print("<<<<<<<...........Re-enter the suitable code........>>>>>>>>>>>")
print("_____________________________________________________________________
___________________________________________________")
print("
")
print("
")
continue
elif choice==4:
mycursor.execute("select * from gasin")
se = mycursor.fetchall()
print("........................... THE STORED DATA IS .............................")
print("
")
print("
")
print("
")
for x in se:
print(x)
print("_____________________________________________________________________
_______________________________")
continue
elif choice==5:
customer_name=input("ENTER YOUR NAME : ")
a="select v_credit , v_debit ,v_accno , v_add from gasin where
v_customer='%s'"%(customer_name,)
mycursor.execute(a)
record=mycursor.fetchall()
for x in record:
print("Credit Amount:",x[0])
print("Debit Amount:",x[1])
print("Account number:",x[2])
print("Address:",x[3])
print("_____________________________________________________________________
__________")
continue
ch=input("Do you want to continu?<y/n>").lower()
if ch=='n':
break
else:
print (" SORRY!!! ......... THE PERSON IS UNIDETIFIED...........!!! ")
print (" SORRY!!! ......... YOU ARE NOT SUPPOSE TO USE THE
SOFTWARE......... !!!")
else:
break
conn.commit()
CONCLUSION
Overall, this code provides a user-friendly interface for managing gas bills and allows for
efficient and convenient management of customer accounts.
BIBLIOGRAPHY