6 kyu
Check if number is prime without loops
270 of 366frusciante
Description:
Return true if n
is prime and false if not;
like:
isPrime(7) == true
isPrime(-7) == true
isPrime(6) == false
isPrime(-6) == false
!important: n
always be integer and can be negative (but you need to handle this);
you can't use loops or hardcode (for
, while
)
Mathematics
Restricted
Algorithms
Similar Kata:
Stats:
Created | Jan 24, 2017 |
Published | Jan 24, 2017 |
Warriors Trained | 969 |
Total Skips | 12 |
Total Code Submissions | 4177 |
Total Times Completed | 366 |
JavaScript Completions | 270 |
C# Completions | 109 |
Total Stars | 27 |
% of votes with a positive feedback rating | 82% of 127 |
Total "Very Satisfied" Votes | 94 |
Total "Somewhat Satisfied" Votes | 21 |
Total "Not Satisfied" Votes | 12 |
Total Rank Assessments | 10 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |