Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjoshua landon
2,418 PointsI've watched the videos 10 times each and still can't figure out the answered to this tuples question. I need help.
Where can I get the answer to this question before I throw my laptop out the window. It is getting very frustrating.
It is the last challenge in the first Swift - functions lessons
2 Answers
Farhad Mohammad Afzali
5,007 PointsHi, here is my solution:
func greeting(person:String) -> (greeting:String, language:String) {
let language = "English" let greeting = "Hello (person)"
return (greeting, language)
}
hope it helps.
David Gieseke
1,662 PointsAwesome!!!!
I had the same problem. Good answer!
I just had to fine tune the ......"Hello (person)" with the back slash as in......."Hello (person)"
Thank you very much!!!!
Gwinyai Nyatsoka
7,428 PointsGwinyai Nyatsoka
7,428 PointsI'm not sure which last challenge you are talking about. The first and third part of Swift Functions and Optionals have questions that have nothing to do with Tuples. But the second part does. So here are the answers to the last questions of each part's challenge:
The answer to the last challenge in Swift Functions and Optionals -> Functions is:
The answer to the last question of the challenge Swift Functions and Optionals -> Optionals is:
and the last challenge in Swift Functions and Optionals -> Optionals is: