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!
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

Essa Saulat
Courses Plus Student 2,399 PointsIn the last part "let chairs = width / chairWidth" Why is the answer 3, when it should be 3.33333?
Does Swift round it off?
1 Answer

Gavin Ralston
28,770 Points"Conversions between integer and floating-point numeric types must be made explicit"
In other words, if you divide integers, they'll stay integers, so the remainder will be truncated. This behavior is common in many languages.
In order to get a floating point answer, you'd need to make the numbers floats or doubles or, maybe apple came up with their own new terminology like "dotted" or "pointy" or something. The docs will help you there.
Ricardo Hill-Henry
38,442 PointsRicardo Hill-Henry
38,442 PointsHere's a good reference OP https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TypeCasting.html
Essa Saulat
Courses Plus Student 2,399 PointsEssa Saulat
Courses Plus Student 2,399 PointsThank you very much! That clears it up :)