Coder Social home page Coder Social logo

cafefikakata's Introduction

Cafe Fika Kata

Setup

Locally run pipenv install. If you don't have pip installed you'll need to run pip install pipenv first.

Once this is setup run ./test.sh

Kata Requirements

Requirement One - Pricing

We want to be able to find out the price of some simple items

Coffee - 5kr Fancy Coffee - 8kr Kanelbulle - 10kr

Requirement Two - Basket shopping

We get a list of items from the customer. What's the total?

Requirement Three - Special offers

There's now a special offer on the bullar. If a customer buys 3 they only pay 25kr.

Requirement Four - Different cafes have different prices

Extend the above so we can have multiple shops with different prices

Requirement Four and a half - Different deals

If you only extended the above for prices do the same for deals

Requirement Five - Stock levels

A cafe has limited stock. When it's sold out orders can't be placed for that time.

Requirement Six - Closing down

When a cafe has no stock of any kind it closes down.

Requirement Seven - Let's take fika international

All the previous requirements dealt in Krona. Now we want to launch in new countries. Each cafe should only work in a single currency.

Considerations

Part of the focus of this Kata is using the type system with mypy.

When defining your functions and classes start to think about what types they will receive and output. Dataclasses added in 3.7 can also help with this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.