Code Monkey home page Code Monkey logo

infrainternshipchallengemay2018's Introduction

Infra Internship Code Challenge - 22nd May 2018

Due: 23rd 9:00am May or Earlier

There are three interdependent tasks in this challenge, complete ALL. The submission instructions are specified at the bottom of the challenge page.

Task 1

This program will be referred to as "logger"

Write a program that prints exactly 1000 lines of text to standard output. Each line of text is a date in the form dd/MM/YYYY, where:

  • valid ranges for days are 00-30
  • valid ranges for months are 1-12
  • valid ranges for years are 2017-2018 The lines of text are to be generated randomly - that is, there should be a reasonably arbitrary distribution of logs from all possible dates.

Task 2

This program will be referred to as "viewer"

Write a program that reads lines of test from standard input. The program should process each line and:

  • Print "Malformed input" and exit, if the line is not in the form dd/MM/YYYY
  • Count lines from each month that appears in a line. The program should not count months that do not appear in any line.
  • Print lines from 0-14th of 2018. Finally, the program should print each logged month with the percentage of lines of text from that month in the form:
    Month: XX%
    Where "Month" refers to the name of that month.
    For example:
    May: 35%

Task 3

Launch the logger program and pipe its output to the viewer program.



How to submit

  1. Check out the format for submitting your code here

  2. Make sure when creating a branch to use your correct phone Number, as this is what we will use to get back to you.

NB: As a branch-name you can also use your email. See you on the other side, and best of luck!

Join Slack

In case you have any questions, join our Slack here and join the #internship-challenge channel.

About Africa's Talking Code Challenges

Please read the overview here.

infrainternshipchallengemay2018's People

Contributors

janikibichi 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.