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

Jan Francírek
Jan Francírek
1,766 Points

Help with this ... Next create a constant called price and assign it the value 9.99.

I thought its

let price: Double = "9.99"

But its still invalid. Can someone give me an advice please?

Thank you very much

3 Answers

Hi Jan,

You've assigned it the string "9.99"

Try let price = 9.99

I wrote the same but it doesn't work.

Hi Mateusz,

Can you post the code you've tried?

Edwin Rozario
Edwin Rozario
2,922 Points

The exercise is not telling to append the answers to the last one. That cased me some failures. I was erasing the last one and adding the results.

Jan Francírek
Jan Francírek
1,766 Points

It works yes, I´ve already soluted 5 minutes ago but altough thank you :)

You're welcome