Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Because the challenge was to win the game as the computer, with the player having the first move, therefore it is impossible for the computer in a 'prefect' situation to recieve a multiple of 5 itself- this means the computer has not played perfectly. I will update the description to make sure -1 is shown as invalid, as Twenty-One specifically starts on 0, therefore should not accept multiples of 5. Thanks for the suggestion!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    We always played it with 4, and sometimes still do, but I do remember some of my friends getting annoyed about 3/4 number :)
    The only difference with winning is multiples of 4, and I think 5s are easier :)

  • Custom User Avatar

    If the integer is divisible by 3, return "Java"
    If the integer is divisible by 3 AND IS EVEN, return "JavaScript"

    If the integer is divisible by 3 and 4, return "Coffee"
    If the integer is divisible by 3 and 4 AND IS EVEN, return "CoffeScript"

    For each case, check if divisibility by 3 works then check if it is even, giving two strings separately that needs to be returned.