arunkumar339 / movies-problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Movies Problem

This repo was created as a way to apply for this programming job at WowMakers. To apply, fork this repo and send in a pull request with the solution for the problem. We will get in touch with you via the email provided in your github profile.

The problem

In data/movies.json, you will find the details of some movies in JSON format. This data includes the name, IMDB ratings and the genres of the movies (a quick glance at the file will give you an idea about the structure of the data).

Your program should print all the genres to the terminal (in alpahabetical order, no repetitions) along with the average rating of movies. For example, Inception and The Pink Panther are the two films belonging to the adventure genre, so the average rating for adventure would be (8.8+5.3)/2 = 7.05.

A part of the expected output is shown here:

...
7.25 Crime
8.55 Drama
8.50 Mystery
...

sample.rb contains the outline for this program to help you get started in Ruby, but you could solve this in any language of your choice.

Sending the pull request

Once you've written the program, send a pull request. We'll not be merging the pull request, but will contact you on the email address provided in your Github profile. It might take us a day or two to get in touch; please be patient.

About


Languages

Language:Ruby 100.0%