February 23 - Find All Potential Products in Ruby
This guide examines how to properly find the full set of potential products in a Ruby collection.
Guide Tasks
- Read Tutorial
- Watch Guide Video
- Complete the Exercise
Video locked
This video is viewable to users with a Bottega Bootcamp license
Already a Bottega Student? Sign In
Summary
Build a method that returns all of the divisible items of two integers.
Exercise Description
Implement a method that returns all of the potential products of two integers in Ruby up through a certain range.
Sample Input
1..120000 # range 200 # number 1 73 # number 2
Expected Output
[14600, 29200, 43800, 58400, 73000, 87600, 102200, 116800]
Real World Usage
This exercise will test your knowledge of how to work with the modulus operator and ranges. Additionally, you'll learn how to return a full collection of selected items.