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

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.