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) Operators Binary Operators

Im stuck on this anybody has the codes?

i don't know what the directions are trying to ask me to do

3 Answers

Patrick Cooney
Patrick Cooney
12,216 Points

So, it's asking you to create a constant named areaInFeet. Remember we have variables, which can be changed and we have constants which cannot. There is a different keyword for each. So type the keyword that corresponds to a constant followed by the name of your variable. You are assigning something to it so next you want to put an equals sign. The equals sign means you're assigning a value to your constant or variable. The next thing to do is type the equation. Remember, area is height times width. The numbers provided in the problem are in inches so you will need to convert them to feet. Give this a try and if you are still having problems please let us know.

hadassahmiggiani
hadassahmiggiani
3,848 Points

sorry, i haven't gone that far in the course...

Laurence Bowe
Laurence Bowe
6,222 Points

It's fine to not understand in fact its shown your temporary kryptonite, So here is the code and after looking at it I hope you understand the question. :) (:

Code:

let height = 120.0
let width = 144.0
let areaInFeet = height/12 * width/12