0% found this document useful (0 votes)
1 views22 pages

Project

Uploaded by

shubham kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views22 pages

Project

Uploaded by

shubham kumar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Project on

Autoalchemy
a car workshop

Project prepared by:


Utkarsh Manral and
Rehaan Jhajharia

Under the guidance of


Ms Pallavi Sharma
PGT Coumpter Science
Index
Page
[Link] Contents
no.

1 Certificate 1

2 Acknowledgement 2

3 About 3

4 SQL Code 4

5 Python Code 7

6 Output 14
Certificate
This is to certify that we, Utkarsh Manral
and Rehaan Jhajharia of class XII have
completed the project work titled “Car
Workshop” in the subject of Computer
Science during the academic year 2024-
25. This project has been carried out
under the guidance of MS. Pallavi
Sharma, and it is submitted as part of the
course requirements for the Central
Board of Secondary Education (CBSE)
examination. We declare that this project
is our original work and has not been
copied from any source.

1
Acknowledgement
In today’s fast-paced world, success is
achieved by those with determination and
passion. With this mindset, I embarked on this
project.
I would first like to express my heartfelt
gratitude to my parents for their unwavering
support and encouragement, which has been
my driving force.
I am deeply thankful to my teacher, Mrs. Pallavi
Sharma, whose guidance was essential in
completing this project successfully.

I also extend my appreciation to Mrs Meetu


Rathore, Principal of Army Public School
Dhaula Kuan, for providing the opportunity to
enhance my skills.
Lastly, I thank my friends and teachers for their
continuous support in making this project a
success.
2
About
This project is a car workshop
management system developed in
Python. It handles various services like
cleaning, servicing, and upgrades, along
with product details such as price,
quantity, and car type. The system
assigns unique customer IDs, tracks
purchases, and stores feedback. The
goal is to improve operational
efficiency, streamline service
management, and enhance customer
experience at the workshop.

3
SQL code
create database autoalchemy;
use autoalchemy;

create table data(pid int(3),pname varchar(50),price int(6),


quantity int(3), cartype varchar(10));
INSERT INTO car_workshop (pid, pname, price, quantity, cartype) values(
(1, 'Deep Clean', 2500, 10, 'sedan'),
(2, 'Deep Clean', 2000, 15, 'hatchback'),
(3, 'Deep Clean', 3000, 8, 'suv'),
(4, 'Exterior Wash', 800, 12, 'sedan'),
(5, 'Exterior Wash', 700, 20, 'hatchback'),
(6, 'Exterior Wash', 1000, 5, 'suv'),
(7, 'Normal Servicing', 1500, 10, 'sedan'),
(8, 'Normal Servicing', 1300, 15, 'hatchback'),
(9, 'Normal Servicing', 1700, 8, 'suv'),
(10, 'Detailed Servicing', 3000, 10, 'sedan'),
(11, 'Detailed Servicing', 2500, 15, 'hatchback'),
(12, 'Detailed Servicing', 3500, 8, 'suv'),
(13, 'Sony System', 20000, 9, 'sedan'),
(14, 'Sony System', 18000, 15, 'hatchback'),
(15, 'Sony System', 22000, 6, 'suv'),
(16, 'Leather Seats', 25000, 5, 'sedan'),
(17, 'Leather Seats', 22000, 10, 'hatchback'),
(18, 'Leather Seats', 27000, 4, 'suv'),
(19, 'Interior Upgrade', 35000, 4, 'sedan'),
(20, 'Interior Upgrade', 32000, 6, 'hatchback'),
(21, 'Interior Upgrade', 38000, 3, 'suv'),
(22, 'Engine Swap', 70000, 5, 'sedan'),
(23, 'Engine Swap', 65000, 7, 'hatchback'),
(24, 'Engine Swap', 75000, 3, 'suv'),
(25, 'Turbocharger - Garrett GT2540', 50000, 6, 'sedan'),
(26, 'Turbocharger - Garrett GT2540', 47000, 5, 'hatchback'),
(27, 'Turbocharger - Garrett GT2540', 55000, 2, 'suv'), 4
(28, 'Suspension - KYB Gas-a-Just', 30000, 7, 'sedan'),
(29, 'Suspension - KYB Gas-a-Just', 28000, 10, 'hatchback'),
(30, 'Suspension - KYB Gas-a-Just', 32000, 5, 'suv'),
(31, 'Bodykit - Veilside Fortune', 40000, 6, 'sedan'),
(32, 'Bodykit - Veilside Fortune', 37000, 8, 'hatchback'),
(33, 'Bodykit - Veilside Fortune', 45000, 4, 'suv'),
(34, 'Stock Tires', 10000, 15, 'sedan'),
(35, 'Stock Tires', 9000, 20, 'hatchback'),
(36, 'Stock Tires', 12000, 10, 'suv'),
(37, 'Drift Tires - Federal 595RS-R', 15000, 10, 'sedan'),
(38, 'Drift Tires - Federal 595RS-R', 14000, 12, 'hatchback'),
(39, 'Drift Tires - Federal 595RS-R', 17000, 8, 'suv'),
(40, 'Spoiler - APR Performance GTC-200', 12000, 8, 'sedan'),
(41, 'Spoiler - APR Performance GTC-200', 11000, 10, 'hatchback'),
(42, 'Spoiler - APR Performance GTC-200', 14000, 7, 'suv'),
(43, 'Headlights - Philips X-tremeVision', 8000, 12, 'sedan'),
(44, 'Headlights - Philips X-tremeVision', 7000, 15, 'hatchback'),
(45, 'Headlights - Philips X-tremeVision', 10000, 8, 'suv'),
(46, 'Exhaust - Borla Cat-Back', 15000, 7, 'sedan'),
(47, 'Exhaust - Borla Cat-Back', 14000, 10, 'hatchback'),
(48, 'Exhaust - Borla Cat-Back', 17000, 5, 'suv'),
(49, 'Air Intake - K&N Cold Air Intake', 12000, 10, 'sedan'),
(50, 'Air Intake - K&N Cold Air Intake', 11000, 12, 'hatchback'),
(51, 'Air Intake - K&N Cold Air Intake', 14000, 7, 'suv'),
(52, 'Crimson Red Paint', 12000, 8, 'sedan'),
(53, 'Crimson Red Paint', 11000, 10, 'hatchback'),
(54, 'Crimson Red Paint', 13000, 7, 'suv'),
(55, 'Azure Blue Paint', 12000, 10, 'sedan'),
(56, 'Azure Blue Paint', 11000, 12, 'hatchback'),
(57, 'Azure Blue Paint', 13000, 8, 'suv'),
(58, 'Apple Green Paint', 11000, 7, 'sedan'),
(59, 'Apple Green Paint', 10000, 10, 'hatchback'),
(60, 'Apple Green Paint', 12000, 5, 'suv'),
(61, 'Matte Black Paint', 14000, 6, 'sedan'),
(62, 'Matte Black Paint', 13000, 8, 'hatchback'),
(63, 'Matte Black Paint', 15000, 4, 'suv'),
(64, 'Pearl White Paint', 10000, 5, 'sedan'),
(65, 'Pearl White Paint', 9000, 7, 'hatchback'),
(66, 'Pearl White Paint', 11000, 4, 'suv'),
(67, 'Chrome Silver Paint', 13000, 10, 'sedan'),
5
(68, 'Chrome Silver Paint', 12000, 12, 'hatchback'),
(69, 'Chrome Silver Paint', 14000, 6, 'suv'),
(70, 'Crimson Red Wrap Paint', 20000, 8, 'sedan'),
(71, 'Crimson Red Wrap Paint', 18000, 10, 'hatchback'),
(72, 'Crimson Red Wrap Paint', 22000, 7, 'suv'),
(73, 'Azure Blue Wrap Paint', 20000, 10, 'sedan'),
(74, 'Azure Blue Wrap Paint', 18000, 12, 'hatchback'),
(75, 'Azure Blue Wrap Paint', 22000, 8, 'suv'),
(76, 'Apple Green Wrap Paint', 18000, 7, 'sedan'),
(77, 'Apple Green Wrap Paint', 17000, 5, 'hatchback'),
(78, 'Apple Green Wrap Paint', 21000, 9, 'suv'),
(79, 'Matte Black Wrap Paint', 22000, 10, 'sedan'),
(80, 'Matte Black Wrap Paint', 21000, 12, 'hatchback'),
(81, 'Matte Black Wrap Paint', 24000, 6, 'suv'),
(82, 'Pearl White Wrap Paint', 18000, 6, 'sedan'),
(83, 'Pearl White Wrap Paint', 17000, 8, 'hatchback'),
(84, 'Pearl White Wrap Paint', 20000, 4, 'suv'),
(85, 'Chrome Silver Wrap Paint', 22000, 10, 'sedan'),
(86, 'Chrome Silver Wrap Paint', 21000, 12, 'hatchback'),
(87, 'Chrome Silver Wrap Paint', 24000, 6, 'suv'),
(88, 'Underglow', 5000, 10, 'sedan'),
(89, 'Underglow', 4500, 12, 'hatchback'),
(90, 'Underglow', 6000, 8, 'suv');

create table bills(bill_id int(3),bill_time varchar(10),


feedback char(100));

6
Python Code
import [Link]
db_conn = [Link](host="localhost", user="root",
password="321", database="autoalchemy")
cursor = db_conn.cursor()

def add_item():
while True:
[Link]('select max(pid) from data')
temp = [Link]()[0]
product_id = temp + 1
product_name = input("Enter product name: ")
price = float(input("Enter product price: "))
quantity = int(input("Enter product quantity: "))
car_type_choice = input("Enter car type (sedan, hatchback, suv):
").lower()

[Link]("insert into data (pid, pname, price, quantity, cartype)


values ({}, '{}', {}, {}, '{}')".format(product_id, product_name.lower(), price,
quantity, car_type_choice.lower()))
db_conn.commit()
print("\nProduct added successfully!")

again = input("Add another product? (yes/no): ").lower()


if again != "yes":
break

def display_low_stock_items():
[Link]("select * from data where quantity < 5")
low_stock_items = [Link]()
if low_stock_items:
print("\nItems low in stock (Qty < 5):")
for item in low_stock_items:
print('Product ID: ',item[0],' Name: ',item[1],' Price: ₹',item[2],'
Quantity: ',item[3])
else:
print("\nNo items are low in stock.") 7
def handle_customer_services():
print("Choose car type (1. Sedan, 2. Hatchback, 3. SUV): ")
car_type_choice = int(input())
if car_type_choice == 1:
car_type = "sedan"
elif car_type_choice == 2:
car_type = "hatchback"
else:
car_type = "suv"

selected_services = []

while True:
print("\n 1. Cleaning\n 2. Modification\n3. Servicing")
service_choice = int(input("Choose service: "))

if service_choice == 1:
print("1. Deep Clean \n 2. Exterior Wash")
cleaning_choice = int(input("Choose cleaning option: "))
if cleaning_choice == 1:
service_name = "Deep Clean"
else:
service_name = "Exterior Wash"
elif service_choice == 2:
print('1. Exterior Modifications')
print('2. Interior Modifications')
aaa=int(input('Choose :'))
if aaa == 1:
print('\n 1. Engine Swap \n 2. Turbocharger \n 3. Spoiler ')
print('\n 4. Suspensions \n 5. Bodykit \n 6. Drift Tires ')
print('\n 7. Headlights \n 8. Air Intake \n 9. Exhaust ')
print('10. Paint \n [Link]')
bbb=int(input('Choose :'))
if bbb==1:
service_name = "Engine Swap"
elif bbb==2:
service_name = "Turbocharger"
8
elif bbb==3:
service_name = "Spoiler"
elif bbb==4:
service_name = "Suspensions"
elif bbb==5:
service_name = "Bodykit"
elif bbb==6:
service_name = "Drift Tires"
elif bbb==7:
service_name = "Headlights"
elif bbb==8:
service_name = "Air Intake"
elif bbb==9:
service_name = "Exhaust"
elif bbb==10:
#paints
print('\n 1. Crimson Red Paint \n 2. Azure Blue Paint \n 3.
Apple Green Paint')
print(' 4. Matte Black Paint \n 5. Pearl White Paint \n 6.
Chrome Silver Paint')
ddd=int(input('Choose :'))
if ddd == 1:
service_name = "Crimson Red Paint"
elif ddd == 2:
service_name = "Azure Blue Paint"
elif ddd == 3:
service_name = "Apple Green Paint"
elif ddd == 4:
service_name = "Matte Black Paint"
elif ddd == 5:
service_name = "Pearl White Paint"
elif ddd == 6:
service_name = "Chrome Silver Paint"

9
[Link]("SELECT * FROM data WHERE pname = %s AND cartype
= %s", (service_name, car_type))
service = [Link]()

if service:
print("Service Selected: " + service[1] + " - ₹" + str(service[2]))
selected_services.append((service[1], service[2]))
else:
print("Warning: " + service_name + " not available for " + car_type)

add_more = input("Add more services? (yes/no): ").lower()


if add_more != "yes":
break
return selected_services

import csv
def generate_bill(selected_services):
if not selected_services:
print("No services selected.")
return

customer_name = input("Enter your name: ")


[Link]("INSERT INTO bills (timestamp) VALUES (NOW())")
db_conn.commit()
[Link]("SELECT MAX(bill_id) FROM bills")
bill_id = [Link]()[0]

total_cost = 0
bill_details = []
[Link]("SELECT timestamp FROM bills WHERE bill_id =
{}".format(bill_id))
timestamp = [Link]()[0]
print("\n---- BILL ----")
print("Bill ID: ", bill_id)
print("Timestamp: ", timestamp)
print("Customer Name: ", customer_name)
print("\nService Name Price")
print("--------------------------- -----") 10
for service in selected_services:
service_name = service[0]
service_price = service[1]
print("{:<25} ₹{}".format(service_name, service_price))
total_cost += service_price
bill_details.append((bill_id, customer_name, service_name, service_price,
timestamp))

print("--------------------------- -----")
print("Total Amount: ₹", total_cost)

feedback_text = input("Please provide your feedback (under 100 words): ")

if len(feedback_text.split()) > 100:


print("Feedback is too long! Please keep it under 100 words.")
return

with open("[Link]", mode="a", newline="") as file:


writer = [Link](file)
[Link](["Bill ID", "Customer Name", "Service Name", "Price",
"Timestamp"])
[Link](bill_details)
[Link]("\n" + "-" * 50 + "\n")

[Link]("UPDATE bills SET feedback = %s WHERE bill_id = %s",


(feedback_text, bill_id))
db_conn.commit()

print("\nThank you for choosing AutoAlchemy!\n")


print('Please visit us again!\n')

11
def view_feedbacks():
[Link]("SELECT bill_id, customer_name, feedback FROM bills
WHERE feedback IS NOT NULL")
feedbacks = [Link]()

if feedbacks:
print("\n---- Feedbacks ----")
for feedback in feedbacks:
print(f"Bill ID: {feedback[0]} - Customer: {feedback[1]}")
print(f"Feedback: {feedback[2]}")
print("-" * 50)
else:
print("No feedbacks available.")

def main():
while True:
print('Welcome to Metaltunes')
print('\nPlease select your role:')
print("\n1. Admin\n2. Customer")

try:
role = int(input('Enter choice: '))
if role == 1:
admin_password = input("Enter admin password: ")
if admin_password == "kaisen":
print("\nAdmin Menu:\n 1. Add Items\n 2. View Low Stock Items \n
3. View Feedbacks")
try:
admin_choice = int(input('Select an option: '))
if admin_choice == 1:
add_item()
elif admin_choice == 2:
display_low_stock_items()
elif admin_choice == 3:
view_feedbacks()

12
else:
print("Invalid choice, please select a valid option.")
except ValueError:
print("Invalid input, please enter a number.")

else:
print("Incorrect password!")

elif role == 2:
selected_services = handle_customer_services()
if selected_services:
generate_bill(selected_services)

else:
print("Invalid role selected. Please choose 1 for Admin or 2 for
Customer.")

except ValueError:
print("Invalid input. Please enter a valid number.")

continue_choice = input("Continue? (yes/no): ").lower()


if continue_choice != "yes":
break

[Link]()
db_conn.close()

main()

13
Output #1
Welcome to Metal tunes

Please select your role:


1. Admin
2. Customer

Enter choice: 2

Choose car type (1. Sedan, 2. Hatchback, 3. SUV): 1

1. Cleaning
2. Modification
3. Servicing

Choose service: 2

1. Exterior Modifications
2. Interior Modifications

Choose : 1

1. Engine Swap
2. Turbocharger
3. Spoiler
4. Suspensions
5. Body kit
6. Drift Tires
7. Headlights
8. Air Intake
9. Exhaust
10. Paint
[Link]

Choose : 1
14
Service Selected: Engine Swap - ₹70000
Want to buy(Y/N)?:N
Do you want to continue(Y/N):Y

1. Exterior Modifications
2. Interior Modifications
Choose : 1

1. Engine Swap
2. Turbocharger
3. Spoiler
4. Suspensions
5. Bodykit
6. Drift Tires
7. Headlights
8. Air Intake
9. Exhaust
10. Paint
[Link]
Choose : 2

Service Selected: Turbocharger - Garrett GT2540 - ₹50000


Want to buy(Y/N)?:Y
Do you want to continue(Y/N):Y

1. Cleaning
2. Modification
3. Servicing
Choose service: 1

Choose cleaning service:


1. Deep Cleaning - ₹10000
2. Car Wash - ₹150
Choose service: 1

Service Selected: Deep Cleaning - ₹10000


Want to buy(Y/N)?: Y
Do you want to continue(Y/N): Y 15
1. Cleaning
2. Modification
3. Servicing
Choose service: 3

Choose servicing type:


1. Oil Change - ₹5000
2. Tire Rotation - ₹3000
3. Brake Check - ₹4000
4. Full Servicing - ₹15000
Choose service: 4

Service Selected: Full Servicing - ₹15000


Want to buy(Y/N)?: Y
Do you want to continue(Y/N): N

Enter your name: Prakhar

-------------------- BILL ----------------------


Bill ID: 1
Timestamp: 2024-10-04 10:32:00
Customer Name: Prakhar

Service Name Price


--------------------------- ----------
Engine Swap ₹50000
Turbocharger ₹12000
Deep Cleaning ₹10000
Full Servicing ₹15000
--------------------------- ----------
Total Amount: ₹87000

Please provide your feedback (under 100 words): Great service, very
happy with the modifications. The car looks amazing!

Thank you for choosing AutoAlchemy!


Please visit us again!

16
Output #2
Welcome to Metal tunes

Please select your role:


1. Admin
2. Customer

Enter choice: 2

Choose car type (1. Sedan, 2. Hatchback, 3. SUV): 3

1. Cleaning
2. Modification
3. Servicing

Choose service: 2

1. Exterior Modifications
2. Interior Modifications

Choose : 2

1. Engine Swap
2. Turbocharger
3. Spoiler
4. Suspensions
5. Body kit
6. Drift Tires
7. Headlights
8. Air Intake
9. Exhaust
10. Paint
[Link]

Choose : 2
17
Service Selected: Turbocharger - Garrett GT2540 - ₹55000
Want to buy(Y/N)?:Y
Do you want to continue(Y/N):Y

1. Exterior Modifications
2. Interior Modifications
Choose : 1

1. Engine Swap
2. Turbocharger
3. Spoiler
4. Suspensions
5. Bodykit
6. Drift Tires
7. Headlights
8. Air Intake
9. Exhaust
10. Paint
[Link]
Choose : 7

Service Selected: Headlights - Philips X-tremeVision - ₹10000


Want to buy(Y/N)?:Y
Do you want to continue(Y/N):Y

1. Cleaning
2. Modification
3. Servicing
Choose service: 1

Choose cleaning service:


1. Deep Cleaning - ₹10000
2. Car wash - ₹150
Choose service: 2

Service Selected: Car wash - ₹150


Want to buy(Y/N)?: Y
Do you want to continue(Y/N): Y
18
1. Cleaning
2. Modification
3. Servicing
Choose service: 3

Choose servicing type:


1. Oil Change - ₹5000
2. Tire Rotation - ₹3000
3. Brake Check - ₹4000
4. Full Servicing - ₹15000
Choose service: 2

Service Selected: Tire Rotation - ₹3000


Want to buy(Y/N)?: Y
Do you want to continue(Y/N): Y

1. Exterior Modifications
2. Interior Modifications
Choose : 1

1. Engine Swap
2. Turbocharger
3. Spoiler
4. Suspensions
5. Bodykit
6. Drift Tires
7. Headlights
8. Air Intake
9. Exhaust
10. Paint
[Link]
Choose : 10

Paints
[Link] Red
[Link] Blue
[Link] Green
[Link] Black
[Link] Silver 19
Choose: 4

Service Selected: Paint - Matte Black - 15000


Want to buy(Y/N)?:Y
Do you want to continue(Y/N):N

Enter your name: Abhinav


-------------------- BILL ----------------------
Bill ID: 2
Timestamp: 2024-10-04 10:45:00
Customer Name: Abhinav

Service Name Price


--------------------------------------------- -----------
Turbocharger - Garrett GT2540 ₹55000
Headlights - Philips X-tremeVision ₹10000
Car wash ₹150
Tire Rotation ₹3000
Paint - Matte Black ₹15000
--------------------------- ------------------ -----------
Total Amount: ₹83150

Please provide your feedback (under 100 words): Metal Tunes offers
great car mods with fair pricing and a user-friendly interface. Overall, a
fantastic experience.

Thank you for choosing AutoAlchemy!


Please visit us again!

20

You might also like