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

More By Author:

Check out these other kata created by Alpri Else

Stats:

CreatedFeb 6, 2016
PublishedFeb 6, 2016
Warriors Trained2849
Total Skips56
Total Code Submissions12780
Total Times Completed1767
Python Completions791
JavaScript Completions683
C# Completions313
Ruby Completions63
Total Stars43
% of votes with a positive feedback rating87% of 313
Total "Very Satisfied" Votes245
Total "Somewhat Satisfied" Votes56
Total "Not Satisfied" Votes12
Ad
Contributors
  • Alpri Else Avatar
  • GiacomoSorbi Avatar
  • raulbc777 Avatar
  • DivyanshBatham Avatar
  • anter69 Avatar
  • maxshuty Avatar
  • kazk Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad