Giter Site home page Giter Site logo

grocery-codejam's Introduction

CODE JAM PROBLEM

###Question### We want to calculate the price of all the goods procured by a customer in a general store. The customer can buy any number of products which fall in categories Book, Medicine, Food. The store gives a discount of 2% on all medicines and 4% on all the books bought in the store. There's is another discount say 5% given if the total bill exceeds UGX 50,000.

We need to come up with a price calculator which will calculate the price of the customer's shopping basket(consisting of all the products procured).

Test cases would be as follows:

#####Input 1:##### 5 books at UGX 2,000 each Medicines worth UGX 4,000 Food worth UGX 20,000

#####Output 1:##### 5 books - 9600 Medicines - 3,920 Food - 20,000 Total - 33,520 discount on total - 0% Grand Total - 33,520

#####Input 2:##### 5 books at UGX 4,000 each Medicines worth of UGX 10,000 Food worth of UGX 30,000

#####Output 2:##### 5 books - 19200 Medicines - 9,800 Food - 22,000 Total - 51,000 discount on total - 5% Grand Total - 48,450`

grocery-codejam's People

Stargazers

Gurpreet Singh avatar  avatar Kato Charles avatar James Muranga avatar

Watchers

Remo Samuel Paul avatar James Muranga avatar James Cloos avatar

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.