GithubHelp home page GithubHelp logo

danphe_screening_test's Introduction

Danphe_screening_test

How to run code

  • Install Ruby on your devise
  • Open a terminal or command prompt
  • Navigate to the directory
  • Run the Ruby code using ruby <file_name.rb> eg: ruby boxy.rb

Problem and there solution

  • Problem 1: Given three numbers X, Y & Z. write a function/method that finds the greatest among the numbers.
    • code: greatest_number.rb
  • Problem 2: Write a program that prints the number from 1 to 100. But for multiples of three print “Fizz” instead of the number & for the multiples of five print “Buzz”. However, for numbers which are multiples of both three and five print “ FizzBuzz” instead.
    • code: fizz_buzz.rb
  • Problem 3: Loop over a string of arbitrary length, and count the occurrence of each character in the string. Note: You can ignore accounting .
    • code: character_count.rb
  • Problem 4: Write a function/method in a generic manner such that it can convert from one number system to another; consider decimal to octal and binary. This method should take in three arguments as indicated below.
    • code: number_system.rb
  • Problem 5: Write a method - let's call it boxy(n) - which produces output in STDOUT as shown below Example: boxy(3) Output: image
    • code: boxy.rb
  • Problem 6: Model the following entity relation requirement. A system has many shops. A shop has many products, which can fall into one or many categories. The products can have different prices on different dates. The solution to this can be an ER diagram with crow-foot notation, or it can be a text file that lists relevant classes and has active record relation statements.

danphe_screening_test's People

Contributors

rukeshb avatar

Watchers

 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.