def calculate_shipping_fee(weight, distance):
    answer = 3000
    if weight > 5:
        answer += (weight - 5) * 500

    if distance > 50:
        answer += ((distance - 50) // 10) * 200

    if weight > 10 and distance > 100:
        answer = answer * 90 // 100
    
    return answer
    
weight=12
distance=120
ret = calculate_shipping_fee(weight,distance)
print(ret)

Embed on website

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