Skip to content

A public repo for the "cleanup the campsite" interview problem in Python

Notifications You must be signed in to change notification settings

replicant-ai/python-campsite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Replicant Grocery Inventory Requirements Specification

Hi and welcome to team Replicant. We have extended our platform functionality to include grocery inventory management. We buy and sell only the finest goods. Unfortunately, our goods are constantly degrading in quality as they approach their sell by date. We have a system in place that updates our inventory for us. Your task is to add a new feature to our system.

First an introduction to our system:

  • All items have a expiry value which denotes the number of days we have to sell the item
  • All items have a quality value which denotes how valuable the item is
  • At the end of each day our system lowers both values for every item

Our system lowers the values for expiry and quality in the following ways:

  • Once the expiry date has passed, quality degrades twice as fast
  • The quality of an item is never negative
  • The quality of an item is never more than 25
  • "Cheddar Cheese" actually increases in quality the older it gets
  • "Instant Ramen", never has to be sold or decreases in quality

We have recently signed a supplier of organic items. Your task is to add this feature to the system. This requires the following updates:

  • "Organic" items degrade in quality twice as fast as normal items
  • Once ANY item is 5 days past its expiry date we can no longer sell it and it should be removed from our system

Your objectives for this challenge:

  • We are looking to see how your technical approach considers these two themes:
    • Adding functionality that aligns with the spec posted above
    • Improving old/ugly code to be be more readable, maintainable and testable
  • Unit testing is important to us so we have included Python's unit testing framework.
  • You don't have to know everything! We encourage using AI to help you.
  • We're not interested in how fast you can code. Take as much time as you need to ensure your submission reflects your best work.
  • If you find you're out of time, please note anything you wanted to do and how you would have done it. Please be as descriptive as possible.

About

A public repo for the "cleanup the campsite" interview problem in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages