Ad
  • Default User Avatar
  • Custom User Avatar

    Your mission, should you choose to accept it, is to write a function that counts the number of sets of twin primes from 1 to n.

    It was not mentioned that the range is end-exclusive.

  • Custom User Avatar

    The function is named howManyHappyNumbers, but the expected answer is happyNumbers. Did you change your mind halfway through building this? :P

    The third example test is incorrect. It asks for happy(300) but tests something like happy(270).

    If you use Test.assertDeepEquals instead of Test.assertSimilar, wrap the tests in individual Test.its ( you can still embed n in its text ) and all tests in a Test.describe, you'll have a much cleaner Test result log.