Case Study For IP2
Case Study For IP2
")
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}.")
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"]
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"]
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
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)