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 trialeugenbernwald
11,046 PointsThe correct answer does not seem to be accepted.
The code I submitted is not accepted as an answer. I have had this problem before and clearing the browser cache helped last time. This time however, it does not.
4 Answers
Jeff McDivitt
23,970 PointsPlease post your code
Chris Stromberg
Courses Plus Student 13,389 PointsI think its working now. I had to reload the page a few times before it would accept the correct answer.
eugenbernwald
11,046 PointsSomehow the code was not pasted in. Here it goes:
protocol Animal { var numberOfLegs: Int { get } }
protocol Pet : Animal { var cuddlyName: String { get } }
struct Dog : Pet { var numberOfLegs = 4 var cuddlyName = "Test" }
eugenbernwald
11,046 PointsThere are normally more line breaks, of course.
Chris Stromberg
Courses Plus Student 13,389 PointsThis code doesn't belong in the answer:
struct Dog : Pet { var numberOfLegs = 4 var cuddlyName = "Test" }
Otherwise its correct.