class Order:
    def __init__(self, price, region):
        self.price = price
        self.region = region

    def calculate_shipping(self):
        base = 3000
        surcharge = 2000 if self.region == "제주도" else 0

        if self.price >= 50000:
            base = 0

        total = base + surcharge
        print(f"기본 배송비 {base:,}원 + 지역 할증 {surcharge:,}원 = 총 배송비 {total:,}원이 부과됩니다.")

order = Order(40000, "제주도")
order.calculate_shipping()

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: