0% found this document useful (0 votes)
22 views3 pages

Case Study For IP2

Uploaded by

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

Case Study For IP2

Uploaded by

dhananjaynair283
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

print("WElCOME TO OUR STORE; where we sell car parts!

")
customer_car= print("What kind of sports car do you drive?")
print(" 1. Toyota Supra MK5 A90")
print(" 2. Nissan Skyline GT-R R34 V-Spec II")
print(" 3. Mazda RX-7 Type RB")
print(" 4. 1969 Ford Mustang Mach 1 Hitman")
print(" 5. Subaru Impreza WRX STi")
choice = int(input("Enter your car number 1,2,3,4,5:"))
if choice == 1:
car_parts = {
"engine": 5000,
"transmission": 3000,
"suspension": 2000,
"brakes": 1500,
"wheels": 2500,
"tires": 1000,
"exhaust": 2000,
"bodykit": 3000,
"spoiler": 500,
"interior": 4000,
}
for part, price in car_parts.items():
print(f"The {part} of the Supra MK5 A90 costs ${price}.")

if "turbo" not in car_parts:


print("The Supra MK5 A90 does not have a turbo.")
car_colors = ["Renaissance Red", "Phantom Matte Gray", "Nitro Yellow"]
print("Available colors for the Supra MK5 A90:")
for color in car_colors:
print(color)
total_cost = sum(car_parts.values())
print(f"The total cost of all parts for the Supra MK5 A90 is $
{total_cost}.")
if total_cost > 10000:
print("The Supra MK5 A90 has an expensive list of parts.")
else:
print("The Supra MK5 A90 has a relatively affordable list of
parts.")

elif choice == 2:
car_parts = {
"engine": 5000,
"transmission": 2000,
"suspension": 1500,
"brakes": 1000,
"wheels": 800,
"tires": 600,
"exhaust": 1200,
"bodykit": 2500,
"spoiler": 400,
"interior": 3000,
}

total_cost = 0
for part, price in car_parts.items():
print(f"The {part} of the Nissan Skyline GTR R34 costs ${price}.")
total_cost += price
print(f"The total cost of all parts is ${total_cost}.")
if "turbo" not in car_parts:
print("The Nissan Skyline GTR R34 does not have a turbo.")
car_colors = ["Midnight Purple", "Bayside Blue", "Millennium Jade"]
print("Available colors for the Nissan Skyline GTR R34:")
for color in car_colors:
print(color)
if len(car_parts) > 10:
print("The Nissan Skyline GTR R34 has an extensive list of parts.")
else:
print("The Nissan Skyline GTR R34 has a moderate list of parts.")

elif choice == 3:
car_parts = {
"engine": {"name": "13B-REW", "price": 5000},
"transmission": {"name": "5-speed manual", "price": 2000},
"suspension": {"name": "coilovers", "price": 1500},
"brakes": {"name": "Brembo", "price": 3000},
"wheels": {"name": "17-inch alloy", "price": 2000},
"tires": {"name": "Michelin Pilot Sport", "price": 1000},
"exhaust": {"name": "Apexi", "price": 1500},
"bodykit": {"name": "Veilside", "price": 4000},
"spoiler": {"name": "rear wing", "price": 1000},
"interior": {"name": "Recaro seats", "price": 2500},
}

total_price = 0
for part, details in car_parts.items():
print(f"The {part} of the Mazda RX-7 Type RB is {details['name']} with a
price of ${details['price']}.")
total_price += details["price"]

print(f"The total price of all parts is ${total_price}.")

if "turbo" not in car_parts:


print("The Mazda RX-7 Type RB does not have a turbo.")

car_colors = ["Crystal White", "Vintage Red", "Montego Blue"]


print("Available colors for the Mazda RX-7 Type RB:")
for color in car_colors:
print(color)

if len(car_parts) > 10:


print("The Mazda RX-7 Type RB has an extensive list of parts.")
else:
print("The Mazda RX-7 Type RB has a moderate list of parts.")
elif choice == 4:
car_parts = {
"engine": {"name": "V8 428 Cobra Jet", "price": 15000},
"transmission": {"name": "4-speed manual", "price": 5000},
"suspension": {"name": "coil springs", "price": 2000},
"brakes": {"name": "power disc", "price": 3000},
"wheels": {"name": "15-inch Magnum 500", "price": 2500},
"tires": {"name": "Goodyear Polyglas", "price": 2000},
"exhaust": {"name": "dual exhaust", "price": 1500},
"bodykit": {"name": "Mach 1 package", "price": 5000},
"spoiler": {"name": "rear wing", "price": 1000},
"interior": {"name": "high-back bucket seats", "price": 4000},
}

total_price = 0
for part, details in car_parts.items():
print(f"The {part} of the 1969 Ford Mustang Mach 1 Hitman is
{details['name']} with a price of ${details['price']}.")
total_price += details["price"]

print(f"\nThe total price of all parts is ${total_price}.")

if total_price > 25000:


print("The total price of parts exceeds $25,000.")
else:
print("The total price of parts is within budget.")
expensive_parts = [part for part, details in car_parts.items() if
details["price"] > 3000]

if expensive_parts:
print("\nExpensive parts:")
for part in expensive_parts:
print(f"- {part}")
else:
print("\nThere are no expensive parts.")

elif choice == 5:
car_parts = {
"engine": 5000,
"transmission": 3000,
"suspension": 2000,
"brakes": 1500,
"wheels": 1000,
"tires": 800,
"exhaust": 1200,
"bodykit": 2500,
"spoiler": 500,
"interior": 2000,
}

total_cost = 0

for part, price in car_parts.items():


print(f"The {part} of the Subaru Impreza WRX STi costs ${price}.")
total_cost += price
print(f"The total cost of all parts is ${total_cost}.")

if "turbo" not in car_parts:


print("The Subaru Impreza WRX STi does not have a turbo.")

car_colors = ["World Rally Blue", "Crystal White Pearl", "Ice Silver Metallic"]
print("Available colors for the Subaru Impreza WRX STi:")
for color in car_colors:
print(color)

if len(car_parts) > 10:


print("The Subaru Impreza WRX STi has an extensive list of parts.")
else:
print("The Subaru Impreza WRX STi has a moderate list of parts.")
else:
("Your car name cannot be found in our databases of cars")

You might also like