Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
Let's take what we've learned about variables and operators to create a simple unit converter that can convert pounds to kilograms and miles to kilometers.
Conversions
$lb_to_kg = 0.453592;
$mile_to_km = 1.60934;
1 pound = 0.453592 kilogram
1 kilogram = 2.20462 pounds
1 mile = 1.60934 kilometers
1 kilometer = 0.621371 miles
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
Mike Wood
9,608 PointsWhen I try to open the workspace it doesn't work and shows the tab as About:blank
Posted by Mike WoodMike Wood
9,608 Points2 Answers
-
John Diamond
768 Points1 Answer
-
Francesco Paolini
9,910 Points1 Answer
-
Ker Sing Tan
10,573 Points1 Answer
-
Sean Flanagan
33,236 Points2 Answers
-
Sean Flanagan
33,236 Points0 Answers
-
Bechir Mihoub
1,118 Points1 Answer
-
Teacher Russell
16,873 Points0 Answers
-
Learning coding
Front End Web Development Techdegree Student 9,937 Points5 Answers
-
Toni Haugsrud
3,196 Points6 Answers
-
Martins Zalans
827 Points3 Answers
-
Madison Wuckowitsch
572 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up