member_level = input("请输入会员等级(普通会员、高级会员、超级会员):")
purchase_amount = float(input("请输入购买金额:"))
product_category = input("请输入商品类别:")
if member_level == "普通会员":
if purchase_amount > 100 and product_category == "日用品":
discount = 0.05
else:
discount = 0
elif member_level == "高级会员":
if purchase_amount > 50:
discount = 0.08
else:
discount = 0
elif member_level == "超级会员":
discount = 0.15
else:
discount = 0
if discount > 0:
discount_amount = purchase_amount * discount
final_amount = purchase_amount - discount_amount
print(f"享受折扣{discount * 100}%,折扣金额为{discount_amount}元,最终需支付{final_amount}元")
else:
print("不享受折扣,需支付金额为", purchase_amount, "元")