Created in Ruby.
- anagrams.rb - returns an array of anagrams that can be made with the specified string. Assume the input is only a single word (e.g. "loot" not "William Shakespeare").
- dice_outcomes.rb - takes the number of dice to roll and the number of times to roll them, then outputs a visual chart in command line of how many times each possible number comes up.
- fibonacci.rb - outputs the Fibonacci Sequence members out to the specified number of members.
- roll_dice.rb - returns the result of rolling N 6-sided dice where N is the input to the method (the default should be 1).
- stok_picker.rb - takes an array of stock prices (prices on days 0, 1, ...) and outputs the most profitable pair of days on which to first buy the stock and then sell the stock
If you want to quick run some the examples to see the code in action, run
$ ruby example.rb
from the project directory.
- Dariusz Biskupski - Initial work - https://dariuszbiskupski.com
It is part of the assignment created for Viking Code School