Code Monkey home page Code Monkey logo

dojo-discount-campaign's Introduction

#The Discount Campaign

##Problem

The owner of a skateboard shop asks you for help: In order to attract more students and pupils to come to her store, she is about to launch a discount campaign. The idea is to offer a rebate for the period of one month. Since she has a pretty much complete set of customer data, she wants to get an overview over the average revenue within the target group, so that she can calculate a proper discount.

##The conditions for participation for customers are defined as follows: The job status of the customer must be one of student, pupil or apprentice The age must be 25 or less (the owner does not want to support long term students!) For the data analysis, all purchases of the calendar year (in this case: 2015) within the target group must be taken into consideration. The shop owner is interested in… the revenue aggregated by months (from January 2015 until December 2015) the total revenue throughout the entire year 2015

##Technical constraints Only lodash

The conditions for participation for customers are defined as follows: The job status of the customer must be one of student, pupil or apprentice The age must be 25 or lower

For the data analysis, all purchases of the calendar year (in this case: 2015) within the target group must be taken into consideration. The shop owner is interested in… the revenue aggregated by months (from January 2015 until December 2015) the total revenue throughout the entire year 2015

Expected output (we don't care of the "syntax")

Revenue for students in 2015 : Jan: 1155.36 €

Feb: 476.43 €

Mar: 1773.00 €

Apr: 1415.22 €

May: 1208.16 €

Jun: 1454.00 €

Jul: 1607.12 €

Aug: 1317.84 €

Sep: 976.02 €

Oct: 767.35 €

Nov: 1228.07 €

Dec: 1582.14 €

∑ 14960.71 €

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.