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 trialBrian Uribe
3,488 PointsAm I missing some information?
There is this quiz, and the question it is asking me makes me feel like i'm missing some information. What am I not realizing with this question?
2 Answers
miikis
44,957 PointsIt evaluates to "not rare;" isAvailable and isCheap both evaluate to true.
Brian Uribe
3,488 PointsOH! I thought it wanted me to fill in the blanks, like isCheap && !isAvailable. Got it, thanks!
Brian Uribe
3,488 PointsOH! I thought it wanted me to fill in the blanks, like isCheap && !isAvailable. Got it, thanks!
Brian Uribe
3,488 Pointsvar isAvailable = true
var isCheap = true
var status: String
if !isCheap && !isAvailable {
status = "super rare"
} else if isCheap && isAvailable {
status = "not rare"
} else if !isCheap && isAvailable {
status = "somewhat rare"
} else {
status = "common"
}
What does status evaluate to? Choose the correct answer below: Skip Quiz Review Video Get Help Next Question A "not rare" B "common" C "somewhat rare" D "super rare"
miikis
44,957 Pointsmiikis
44,957 PointsWhat's the question?