nanafox / top-ruby-basics-projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Odin Project - Basic Ruby Projects

Project: Caesar Cipher

Source Code

Description

This is a simple implementation of the Caesar Cipher in Ruby. The program takes a string and a shift factor as input and returns the encrypted string.

How to use

  1. Clone this repository to your local machine.
  2. Navigate to the project directory.
  3. Run the program by executing the following command:
ruby caesar_cipher.rb
  1. Follow the on-screen instructions to encrypt a string.

Project: Sub Strings

Source Code

Description

This is a simple implementation of a method that takes a word as the first argument and then an array of valid substrings (the dictionary) as the second argument. It returns a hash listing each substring that was found in the original string and how many times it was found.

How to use

  1. Clone this repository to your local machine.
  2. Navigate to the project directory.
  3. Run the program by executing the following command:
    ruby sub_strings.rb
  4. Follow the on-screen instructions to find the substrings in a word.

Project: Bubble Sort

Source Code

Description

This is a simple implementation of the Bubble Sort algorithm in Ruby.

Project: Stock Picker

Source Code

Description

This is a simple implementation of a method that takes an array of stock prices, one for each hypothetical day. It returns a pair of days representing the best day to buy and the best day to sell.

About


Languages

Language:Ruby 100.0%