7 kyu
Sexy Primes <3
791 of 1,767Alpri Else
Description:
Sexy primes are pairs of two primes that are 6
apart. In this kata, your job is to complete the function which returns true
if x
& y
are sexy, false
otherwise.
Examples
5, 11 --> true
61, 67 --> true
7, 13 --> true
5, 7 --> false
1, 7 --> false (1 is not a prime)
Note: x
& y
are always positive integers, but they are not always in order of precendence... For example you can be given either (5, 11)
or (11, 5)
- both are valid.
Fundamentals
Similar Kata:
Stats:
Created | Feb 6, 2016 |
Published | Feb 6, 2016 |
Warriors Trained | 2849 |
Total Skips | 56 |
Total Code Submissions | 12780 |
Total Times Completed | 1767 |
Python Completions | 791 |
JavaScript Completions | 683 |
C# Completions | 313 |
Ruby Completions | 63 |
Total Stars | 43 |
% of votes with a positive feedback rating | 87% of 313 |
Total "Very Satisfied" Votes | 245 |
Total "Somewhat Satisfied" Votes | 56 |
Total "Not Satisfied" Votes | 12 |