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

Adil Gherib
Adil Gherib
304 Points

Is it possible to set in preferences metric system. Really, no one care about inches and feet except you guys. Thanks

Thanks!

area.swift
// the height and width of a wall
let height = 120.0 // in inches
let width = 144.0 // in inches

let areaInFeet = height * width

1 Answer

Jhoan Arango
Jhoan Arango
14,575 Points

Hello Adil:

I this a question or a statement ?

On regards of the metric system, I don't think what's being taught in this video has anything to do with the metric system, but to use calculations for different things as this is just an example of the capabilities of swift, all you have to do is use some math to calculate areas. You can use meters, or feet, which ever you like to satisfy your project needs.

Happy Coding.