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 trialjurgen meco
30 PointsCAN SOMEBODY HELP ME PLEASE??
I TRIED VERY HARD, BUT I STILL DONT GET IT, PLEASE HELP.
1 Answer
kjvswift93
13,515 PointsThe best way to answer this challenge is to use the declared constant names 'width' and 'height' passed into the new constant, as opposed to using the numbers they are initially assigned to. Granted, they are declared as constants so the numbers won't change, but this is best practice.
// the height and width of a wall
let height = 120.0 // in inches
let width = 144.0 // in inches
let areaInFeet = (height / 12) * (width / 12)
rdaniels
27,258 Pointsrdaniels
27,258 PointsThis worked for me. the trick is dividing both values by 12 before multiplying. You have to change "inches" into "feet". Hope this helps!