Delivery fee

A web shop charges a delivery fee in euros. Members never pay the standard fee. Other customers pay no standard fee on orders of €50.00 or more, and €4.95 below that. An order with a bulky item, such as a bookcase, costs an extra €15.00 on top of whatever the standard fee is, including when that fee is 0.

Figure 1 shows the rule as a flowchart.

graph TD
    accTitle: Delivery fee flowchart
    accDescr: Members and orders of 50 euros or more get a fee of 0, other orders a fee of 4.95. A bulky item then adds 15 to the fee.
    A((Start)) --> B[/"<i>total</i>, <i>is_member</i>, <i>is_bulky</i>"/]
    B --> C{"Is <i>is_member</i><br>True?"}
    C -- Yes --> E["<i>fee</i> = 0"]
    C -- No --> D{"Is <i>total</i><br>>= 50?"}
    D -- Yes --> E
    D -- No --> F["<i>fee</i> = 4.95"]
    E --> G{"Is <i>is_bulky</i><br>True?"}
    F --> G
    G -- Yes --> H["<i>fee</i> = <i>fee</i> + 15"]
    G -- No --> I[/"<i>fee</i>"/]
    H --> I
    I --> Z((End))
Figure 1: Flowchart of the delivery fee (Question 1).

Listing 1 shows 4 implementations of delivery_fee.

Which implementations in Listing 1 follow the flowchart in Figure 1 for every input?

Listing 1: Four implementations of delivery_fee (Question 1).
(a)
def delivery_fee(
    total: float, is_member: bool, is_bulky: bool
) -> float:
    if is_member or total >= 50:
        fee = 0.0
    else:
        fee = 4.95
    if is_bulky:
        fee = fee + 15.0
    return fee
(b)
def delivery_fee(
    total: float, is_member: bool, is_bulky: bool
) -> float:
    if is_member or total >= 50:
        fee = 0.0
    elif is_bulky:
        fee = 4.95 + 15.0
    else:
        fee = 4.95
    return fee
(c)
def delivery_fee(
    total: float, is_member: bool, is_bulky: bool
) -> float:
    fee = 0.0
    if not is_member or total < 50:
        fee = 4.95
    if is_bulky:
        fee = fee + 15.0
    return fee
(d)
def delivery_fee(
    total: float, is_member: bool, is_bulky: bool
) -> float:
    fee = 0.0
    if not is_member and total < 50:
        fee = 4.95
    if is_bulky:
        fee = fee + 15.0
    return fee