Ad
  • Custom User Avatar

    Hey guys thx. You both make my day. I solved the kata. Didn't know, that I have to keep the functions name and the parameters name. Thanks again and have a nice weekend. :o)

  • Custom User Avatar

    Sorry for late response...
    The signature is func bmi(_ weight: Int, _ height: Double) -> String, so func calcBMI(userWeight weight: Double, userHeight height: Double) -> String won't work.

  • Custom User Avatar

    AFAIK, it works in Swift, check the function's name, in the kata it's bmi and the parameter's types are Int and Double, click reset to see it.

  • Custom User Avatar

    Hey guys, is the Swift version broken? I'm 100% sure my solution is working in XCode and Playgrounds on iOS.

    Cheers

  • Custom User Avatar

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

  • Custom User Avatar

    Post your code and we can help.
    (Note: with a spoiler flag, and using markdown formatting.)

  • Custom User Avatar

    Hi guys, I' new to programming. Codewars give me this error altough the func works properly in Swift Playgrounds. Can you help me with this?

    solution.swift:10:1: error: expressions are not allowed at the top level
    bmiCalc(userWeight: 85, userHeight: 1.75)
    ^
    Thanks.