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 trialXavier Jacome
5,844 PointsCan someone help me, please? This could should work i don't know what is wrong.
It should be an easy fix
protocol Animal {
var numberOfLegs: Int { get }
}
protocol Pet: Animal {
var cuddlyName: String { get }
}
2 Answers
Michael Ayoub
7,689 PointsI just typed this in the challenge and it worked:
protocol Animal {
var numberOfLegs: Int { get }
}
protocol Pet: Animal {
var cuddlyName: String { get }
}
Your code did not work in the challenge because the challenge is bugged. You typed 2 white spaces before Pet's curly bracket and before cuddlyName: String 's curly bracket. This doesn't change anything in Xcode but it affects the bugged challenge.
Michael Ayoub
7,689 PointsIt works for me in Xcode.
Xavier Jacome
5,844 PointsYeah, the code works in XCode but not in the challenge.