Question: This code is written in Xcode 7.3. I can't figure out why i'm getting this error. In swift 1.0 it was working fine. But in swift 2.2 it is not.

[![image desc](https://i.stack.imgur.com/tPUy2.png)](https://i.stack.imgur.com/tPUy2.png)

Answer: 
From the Swift 2.x documentation:

> 
> **Local and External Parameter Names for Methods**
> 
> 
> Function parameters can have both a local name (for use within the
>  function’s body) and an external name (for use when calling the
>  function), as described in Specifying External Parameter Names. The
>  same is true for method parameters, because methods are just functions
>  that are associated with a type.
> 
> 
> ...
> 
> 
> **Swift gives the first parameter name in a method a local parameter
>  name by default, and gives the second and subsequent parameter names
>  both local and external parameter names by default**. This convention
>  matches the typical naming and calling convention you will be familiar
>  with from writing Objective-C methods, and makes for expressive method
>  calls without the need to qualify your parameter names.
> 
> 
> 

---

To match exactly the Swift 1.0 syntax in your screenshot you have to write

```
func isDivisible(divided divided: Int, divisor: Int) -> Bool {}

```

By the way: `if divided % divisor` does not compile, you can replace the whole function body by 

```
return divided % divisor == 0

```
The below should work as expected: 

```
func isDivisible(divided: Int, divisor: Int) -> Bool {
    if divided % divisor == 0 {
        return true
    }
    else {
        return false
    }
}

```