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 trial

iOS Swift Basics (retired) Types Numbers

I'm being told that my constant has the wrong value in it. However it has the required value.

Asked to create a constant with the name title and the string value "A Dance With Dragons". Wrote code:

let title = "A Dance With Dragons"

Yes I'm being told my constant has the wrong value!

numbers.swift
let title = "A Dance With Dragons"

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Challenges are picky. That should be the title of this book. And no, your code isn't correct. This is what it wants:

let title = "A Dance with Dragons"

Note the lowercase w in with.

Thanks for your help Jennifer! I double and triple checked whether I had the right capitalisation on the title and I still couldn't see it.

As far as I can see, the only issue was the capitalisation within the string itself, the rest of the code was correct.

Reed Carson
Reed Carson
8,306 Points

thats correct. Remember, to the human what looks like a minor or negligible discrepancy will to the compiler look completely unknown. Its a good rule of thumb to remember that computers are very very dumb. They really are not smart. If you dont give it exact directions, it wont work right, or even work at all.