Vehicle Premium Python Code

WeCare insurance company wants to calculate premium of vehicles.
Vehicles are of two types – "Two Wheeler" and "Four Wheeler". Each vehicle is identified by vehicle id, type, cost and premium amount.
Premium amount is 2% of the vehicle cost for two wheelers and 6% of the vehicle cost for four wheelers. Calculate the premium amount and display the vehicle details.

Identify the class name and attributes to represent vehicles. 

  • calculate_premium()
  • vehicle_cost
  • TwoWheeler
  • vehicle_type
  • vehicle_id
  • Vehicle
  • premium_amount
  • FourWheeler
  • premium_percentage
  • calculate_vehicle_cost()
  • __init__()
  • display_vehicle_details()

Write a Python program to implement the class chosen with its attributes and methods.


SOLUTION:


Post a Comment

0 Comments