Professional Documents
Culture Documents
Of Excellence
1
CERTIFICATE
School Stamp:
2
ACKNOWLEDGMENT
3
INDEX
1. Information 05
2. Objective 06
3. Required Software 07
4. Required Hardware 07
5. Technology 08
6. Source Code 09
7. Output 14
8. Conclusion 18
9. Reference 18
4
INTRODUCTION
5
OBJECTIVE: -
The main objective of the project including the
following:
1.It reduces workload of traffic police and makes this
whole challan process easy.
2.It ensures that the money will be directly credited
to the government.
3.It reduces the chances of error and one will have
digital proof of their challan which will be valid
throughout the state.
4.It will also spread the national concept of equality
as everyone will be equal before law.
5.Enforce traffic regulations.
6
SOFTWARE REQUIREMENT
SPECIFICATION
Software is the part of the computer system, which
enables the user to interact with several physical
hardware devices.
HARDWARE REQUIREMENT
SPECIFICATION
The collection of internal electronic circuits and external
physical devices used in building a computer is called the
Hardware.
7
TOOLS AND TECHNOLOGY :
FEATURES OF PYTHON :-
1. Easy to code.
2. Free and Open Source.
3. Object-Oriented Language.
4. GUI Programming Support.
5. High-Level Language.
6. Extensible feature.
7. Python is Portable language.
8. Python is Integrated language.
9. 9.Interpreted Language.
10. 10.Large Standard Library
8
Source Code
db=con.connect(host="localhost",user="roo
t", password="Ayush24")
cur=db.cursor()
cur.execute("show databases")
database=cur.fetchall()
c=0
for i in database:
if "echallan1" in i:
print("************************GOVERNMENT
OF INDIA**************************")
print(" GUJARAT POLICE
")
print("
")
print(" CHALLAN DETAILS
")
cur.execute("use echallan1")
c=1
break
if c==0:
cur.execute("Create database
echallan1")
9
cur.execute("use echallan1")
cur.execute("create table
challan(Echallan_No int primary
key,date date, time
varchar(10),vehicle_no
varchar(15),State
varchar(10),Location
varchar(15),reason
varchar(50),challan_amount
int(15),payment_mode varchar(30))")
cur.execute("create table
validity(vehicle_no int(10),due_date
date)")
def challan():
Echallan_No=input("Enter Echallan
Number")
date=input("Enter Date")
time=input("Enter Time")
vehicle_no=input("Enter Vehicle
No")
State =input("Enter State")
Location=input("Enter Location")
reason=input("Enter Reason")
amount=input("Amount For Cause")
payment=input("Enter Payement
Mode")
q1="insert into challan
values(%s,%s,%s,%s,%s,%s,%s,%s,%s)"
val=(Echallan_No,date,time,vehicle_
no,State,Location,reason,amount,pay
ment)
cur.execute(q1,val)
10
db.commit()
def validity():
vehicle_no=input("Enter Vehicle
No")
incident_date=input("Enter Incident
Date")
validity=input("This Challan Form
Will Be Invalid After One Week Of
Incident")
q2="insert into validity
values(%s,%s,%s)"
val=(vehicle_no,validity,penalty)
cur.execute(q2,val)
db.commit()
def amount():
vn=input("Enter vehicle number")
q1="select * from challan"
cur.execute(q1)
d=cur.fetchall()
for data in d:
if vn in data:
print("\n1Reason",data[6],"\
n2Amount",data[7])
else:
print("---------------
RECORD DOES NOT EXIST--------------
---")
def precautions():
print("\n1.Do not drink and
drive\n2.Keep a safe distance
11
from vehicles!\n3.Drive within
the speed limits.")
while True:
print("\n1.Make Challan\n2.Track
old
records\n3.Precaution\n4.validi
ty\n5.Generate Challan")
ch=int(input("Enter your choice"))
if ch==1:
challan()
elif ch==2:
amount()
elif ch==3:
precautions()
elif ch==4:
validity()
elif ch==5:
cur.execute("select*from
challan")
c=cur.fetchall()
name=input("Enter vehicle
number")
for i in c:
if i[2].upper()==name.upper():
file=open("challan.txt","w")
print("*******GOVERNMENT OF
INDIA*************")
print(" Challan Details ")
s="Vehicle
No:"+str(i[2])+"\nDate:"+str(i[
12
0])+"\nTime:"+str(i[1])+"\nLoca
tion:"+str(i[5])+"\nReason:"+st
r(i[6])+ "\nAmount:"+str(i[7])
file.write(s)
file.close()
else:
print("Wrong choice")
break
13
Output
→Main Menu
→Making Challan
14
→Tracking Old Records
→Precautions
4.Validity
15
5.Generate Challan
→Bill Output
16
→Challan Table Details
→Validity table
17
Conclusion
REFERENCE
• https://panchalvikascs.blogspot.com/
• https://nevonprojects.com
• https://opus.govst.edu
18