Ad
  • Custom User Avatar

    Please HELP, check the @verdugo's issue* below. There is a problem in Swift version of this question.

    Best

  • Custom User Avatar

    No, You shouldn't my friend! This is a serious mistake for the Swift example. Example designed as a non-optional, but the Test case was written with an optional scenario. So, must be one or another, not both.

    *** PLEASE, URGENT HELP ***

    Everything depends on this question on earth right now!

    Note: I was planning to listen to the "Rihanna - Diamonds" but now I'm listening to the "The Cardigans - Nil" song.

  • Custom User Avatar

    Thank you for your comment. I updated with the easy solution after thinking mathematically. And it worked like a charm.

    Best.

  • Custom User Avatar

    I passed the Test, but when I attempt my answer I got an error:

    main.swift:32:11: warning: variable 'randomStreet' was never mutated; consider changing to 'let' constant
    var randomStreet: Int = 0
    ~~~ ^
    let
    Fatal error: Unexpectedly found nil while unwrapping an Optional value: file test/solution.swift, line 18

    This code not in the test cases. So I can't send my correct answer to the site.