Computer Project
Computer Project
Python
Project: The Healthy Times health and fitness club has
announced discounts for its membership holders. The
club provides three types of memberships - Gold,
Diamond and Platinum. The membership codes for
Gold, Diamond and Platinum are 1, 2 and 3
respectively. The club also offers healthy meal plan for
its members - Type A, Type B. The cost of meal plan is
Type A - Rs. 250 per day and Type B - Rs. 350 per day.
Create a python program that will accept the Name of
Customer, Membership Code, Meal Plan, and Number
of days for which the customer wants to opt for the
meal plan.
cost_of_type_A=250
cost_of_type_B=350
if(discount_type=="A" or discount_type=="B"):
if(membership_code==1):
if(discount_type=="A"):
amt=number_of_days*cost_of_type_A
disc=0.1*amt
else:
amt=number_of_days*cost_of_type_B
disc=0.15*amt
print("Bill Amount:",amt)
print("Discount:",disc)
print("Payable Amount:",amt-disc)
if(membership_code==2):
if(discount_type=="A"):
amt=number_of_days*cost_of_type_A
disc=0.15*amt
else:
amt=number_of_days*cost_of_type_B
disc=0.2*amt
print("Bill Amount:",amt)
print("Discount:",disc)
print("Payable Amount:",amt-disc)
if(membership_code==3):
if(discount_type=="A"):
amt=number_of_days*cost_of_type_A
disc=0.2*amt
else:
amt=number_of_days*cost_of_type_B
disc=0.25*amt
print("Bill Amount:",amt)
print("Discount:",disc)
print("Payable Amount:",amt-disc)
Output:
Enter Customer Name:Satyam
Discount: 2450.0