Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics (Retired) Things That Count Exceptions

What is ratio?

Tell my please RATIO meaning.

A ratio shows the relative sizes of two or more values. For instance, if you had 10 cats and 5 dogs, the ratio of cats to dogs is 2.0, or 2:1. The ratio of dogs to cats is 0.5, or 1:2. "ratio" in this video is a variable.

1 Answer

To add to what Vipul Periwal said a ratio can also be though of as a fraction or the product of division.

For example a picture with a height of 3m and a width of 2m has a height to width ratio of 3/2. This can also be expressed as the product of 3 divided by 2 or a height to width ratio of 1.5.