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 trialColin Rhys
2,469 PointsHow is what I am typing in wrong?!? Looks good to me
Look at the code
// Enter your code below
func coordinates(for location: String) -> (Double, Double) {
var result = (0.0, 0.0)
switch String() {
case "Eiffel Tower": result = (48.8582, 2.2945)
case "Great Pyramid": result = (29.9792, 31.1344)
case "Sydney Opera House": result = (33.8587, 151.2140)
default: result = (0,0)
}
return result
}
1 Answer
Alex Koumparos
Python Development Techdegree Student 36,887 PointsHi Colin,
Your error is in this line:
switch String() {
Remember that when we use switch
we are testing a specific value (in this case the contents of your location
variable).
Cheers,
Alex
Colin Rhys
2,469 PointsColin Rhys
2,469 PointsAh, of course, Thank you!!!