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 trialAbdijabar Mohamed
1,462 PointsIs there any error in the code?
func getTowerCoordinates(location: String)-> (Double, Double) { switch location { case "Eiffel Tower": return (48.8582, 2.2945) case "Great Pyramid": return (29.9792, 31.1344) case "Sydney Opera House": return (33.857, 151.2140) default : return (0,0) } }
15 Answers
Jake Adams
1,608 PointsI can confirm, using Xcode playground that your code compiles. Whether the information is correct, I do not know :)
func getTowerCoordinates(location: String)-> (Double, Double) {
switch location {
case "Eiffel Tower": return (48.8582, 2.2945)
case "Great Pyramid": return (29.9792, 31.1344)
case "Sydney Opera House": return (33.857, 151.2140)
default : return (0,0)
}
}
Abdijabar Mohamed
1,462 PointsThanks all I needed was the confirmation. The info is correct but mine does not compile.
Jake Adams
1,608 PointsCan you post a link to the challenge? I can help figure it out with you if you'd like
Abdijabar Mohamed
1,462 PointsI have figured out, Thanks alot
Steven Deutsch
21,046 PointsJake Adams have you just been grinding all day? Do you have a specific goal? Let me know when you sleep so I can try and answer some questions ;)
Jake Adams
1,608 PointsSteven Deutsch I got a little addicted :) I like answering questions as it's a good way for me to learn. I've been a developer for many years, but I'm new to Objective-C and Swift. Mostly today, I spent preparing for a talk that I gave tonight, so I was answering questions during my many breaks
Jake Adams
1,608 PointsAlso, Abdijabar Mohamed and Steven Deutsch, ya'll are adding "answers" to this question. Be sure to use the "Add Comment" button instead of the answer box, to help keep the questions cleaner :)
Steven Deutsch
21,046 PointsSorry! The discussion got so long I didn't notice. I hope your talk went well. In what area is your development experience if you don't mind me asking?
Abdijabar Mohamed
1,462 PointsMy goal is to finish 2 hours and be able to do some more coding. What about you?
Steven Deutsch
21,046 PointsI've just been studying/coding since 5:30am with breaks every few hours when my brain shuts down
Abdijabar Mohamed
1,462 Pointswhich school do you go to?
Abdijabar Mohamed
1,462 PointsIt is 5.50 am here in California and I will be on and on off in my coding sessions , until 2 am
Steven Deutsch
21,046 PointsI'm not in school. I work as a flooring contractor and do interior remodeling. I've completed two years towards a Bachelors in Economics but I'm not interested in the field any longer. I took a month off work to self study software development. How about you?
Abdijabar Mohamed
1,462 PointsI am a computer science major at Middlebury College, Vt, USA and I realize that in school no one teaches you about app development so I guess I will be deeply immersed in TeamTreeHouse for a while. Do you have any app that you developed/ developing. Where do you live?
Steven Deutsch
21,046 PointsThe educational system not teaching enough development is one of the reasons why I did not restart my major and pursue a bachelors in computer science. I do, however, lack the technical foundation by not doing so. I'm new to programming and software development. I haven't developed anything before but I would love to be able to build things some day! I'm from Chicago, IL.
Abdijabar Mohamed
1,462 PointsAs much as I am a major ( I declared it a month ago) but we are at the same level now, if you are not better actually. I think it would be good to work together and develop something together. I will add you on facebook if you want and we can keep in touch.
Steven Deutsch
21,046 PointsYeah, no problem. I had to re-activate my Facebook, I never use it. I was thinking of creating a Twitter soon to network with developers. Do you have one?
Abdijabar Mohamed
1,462 PointsI am not a big fan of twitter man ,haha
Steven Deutsch
21,046 PointsWhat is your Facebook?
Abdijabar Mohamed
1,462 PointsAbdi Jabar
Jake Adams
1,608 PointsJake Adams
1,608 PointsCan you update your question to add the Markdown code styling to it? It will make this much easier to read