Copy of Computer-Project (2) (1)
Copy of Computer-Project (2) (1)
1 | Page
INDEX
1 acknownledgment 3
3 Flow chart 6
6 references 17
2 | Page
Acknowledgement
3 | Page
About The Project
Key Features:
4 | Page
● Dynamic Fee Calculation: Automatically calculates
parking fees based on the number of days
5 | Page
● Simple Menu Interface: Provides an easy-to-use, text-
based menu for interacting with the system.
Technologies Used:
● Database: MySQL
Database Structure:
Use Case:
Potential Improvements:
6 | Page
Flow Chart
7 | Page
Source Code Of Project
import os
import platform
import mysql.connector
mycursor = mydb.cursor()
def Add_Record():
L = []
L.append(id1)
8 | Page
L.append(pname1)
L.append(level1)
L.append(freespace1)
L.append(vehicleno1)
L.append(nod1)
if nod1 == 1:
Payment1 = 20
elif nod1 == 2:
Payment1 = 40
elif nod1 == 3:
Payment1 = 60
elif nod1 == 4:
Payment1 = 80
elif nod1 == 5:
Payment1 = 100
elif nod1 == 6:
Payment1 = 120
9 | Page
else:
L.append(Payment1)
stud = tuple(L)
try:
mycursor.execute(sql, stud)
mydb.commit()
print(f"Error: {err}")
def Rec_View():
print("4. All")
10 | Page
ch = int(input("Enter the choice : "))
try:
if ch == 1:
rl = (s,)
mycursor.execute(sql, rl)
elif ch == 2:
rl = (s,)
mycursor.execute(sql, rl)
elif ch == 3:
rl = (s,)
mycursor.execute(sql, rl)
elif ch == 4:
mycursor.execute(sql)
else:
11 | Page
print("Invalid choice!")
return
res = mycursor.fetchall()
for x in res:
print(x)
print(f"Error: {err}")
def Vehicle_Detail():
L = []
L.append(vid1)
L.append(vnm1)
L.append(dateofpur1)
vdt = tuple(L)
12 | Page
try:
mycursor.execute(sql, vdt)
mydb.commit()
print(f"Error: {err}")
def Vehicle_View():
to be viewed : "))
rl = (vid1,)
try:
mycursor.execute(sql, rl)
res = mycursor.fetchall()
for x in res:
13 | Page
print(x)
print(f"Error: {err}")
def remove():
rl = (vid1,)
try:
mycursor.execute(sql, rl)
mydb.commit()
print('Removed successfully!')
print(f"Error: {err}")
def Menu():
while True:
print("\nMenu:")
14 | Page
print("Enter 4 : To Remove Vehicle Record")
print("Enter 6 : Exit")
if input_dt == 1:
Add_Record()
elif input_dt == 2:
Rec_View()
elif input_dt == 3:
Vehicle_Detail()
elif input_dt == 4:
remove()
elif input_dt == 5:
Vehicle_View()
elif input_dt == 6:
break
else:
def runAgain():
15 | Page
while True:
if runAgn.lower() == 'y':
if platform.system() == 'Windows':
os.system('cls')
else:
os.system('clear')
Menu()
else:
print("Exiting program.")
break
Menu()
runAgain()
16 | Page
Output Screening
17 | Page
18 | Page
19 | Page
Future Enhancement Of Project
20 | Page
references
www.google.com
https://pythontrends.wordpress.com
21 | Page