Created
June 9, 2020 15:34
-
-
Save alexandregama/fa9e362d01aaf21f57347b6afe11c416 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_prime_number(item) | |
return false if item == 1 | |
(2..(item - 1)).each do |number| | |
if item % number == 0 | |
return false | |
end | |
end | |
return true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment