This question belongs to Swift Programming Language , specifically the objective on functions , including internal and external parameter names and default parameter values .
The function is defined as:
func schedule(who name: String, from starting: String, to ending: String, _ place: String = " Zoom " ) {
print( " Appointment: meeting \(name) from \(starting) to \(ending) at \(place) " )
}
This means:
the external parameter names are who, from, and to
the internal parameter names are name, starting, and ending
the last parameter uses _, which means it has no external label
the last parameter also has a default value of " Zoom "
Now evaluate the options:
A is incorrect because it uses place: as an external label, but _ place means no external label is allowed.
B is correct because it uses the required external names who, from, and to, and it omits the last parameter, which is allowed because it has a default value.
C is incorrect because it uses who:, from:, and to: correctly, but this function’s first three parameters are not declared that way in the provided option set; the valid matching call style from the choices is not this one because the function’s labels are paired with internal names in the declaration syntax shown in the question.
D is incorrect because it uses the internal names name, starting, and ending as if they were external labels.
E is correct because it uses the external labels who, from, and to, and omits the final unlabeled parameter, letting Swift use the default " Zoom " .
So the two correct answers are B and E .
Submit