Part 1 — The Brief

Introduction

Everything in the below exercise is intentionally vague. Fill in gaps as necessary, there is no right or wrong answer.

The intention is to try and push the AI as far as you can, while maintaining good quality, tested and functioning code.

Mediship Pricing Exercise

Mediship is a company that couriers medical samples and drugs. We need to price a shipment of up to three items. A single item costs £5 to ship over 2 days, but £15 to ship overnight.

Full Brief

Having had a further conversation with an "expert", we have identified that the problem is slightly more complicated than first thought. Mediship needs a simple application to price a shipment of up to three items, of possibly different types.

Basic Rates

2 daysOvernight
Ambient5.0015.00
Chilled22.0043.00

Additional Pricing Rules

These are not in priority order, so you can choose which ones to implement first.

  • 3 items to the same address have a 10% discount
  • Account holders have a 5% discount on all shipments, but only 3% on top of the same address discount
  • For temperature controlled items, the receiver has to pay a 60.00 deposit if it can't return the container on delivery
  • That deposit will be refunded when the container is retrieved on the next delivery
  • There's a 10.50 supplement if the origin or receiver is further than 50 km from the nearest depot
  • Liechtenstein has special inbound customs clearing, which costs 15.45 extra