Ad
  • Default User Avatar

    My solution works but Codewars Environment throws and error.
    "solution.swift:23:31: error: value of type 'Duration' has no member 'formatted'".

    Duration does have the 'formatted()' method.

  • Default User Avatar

    I get this message when using FrankK's solution:
    error: winningNumber.playground:72:13: error: 'random()' is unavailable in Swift: Use arc4random instead.
    return (random() % limit)+min

    But, arc4Random_uniform, also does not work, although it works perfectly in Playgrounds.