randRange( 2, 10 ) randRange( 2, 10 ) randRange( 2, 5 ) RATIO_GIRLS * FACTOR RATIO_BOYS * FACTOR NUM_GIRLS + NUM_BOYS

In course( 1 ) class, the girl to boy ratio is RATIO_GIRLS to RATIO_BOYS.

If there are NUM_GIRLS girls, how many boys are there?

NUM_BOYS boys

A ratio of RATIO_GIRLS girls to RATIO_BOYS boys means that there is a group of RATIO_GIRLS girls for every group of RATIO_BOYS boys.

If there are NUM_GIRLS girls, then there are FACTOR groups of RATIO_GIRLS girls each.

Because we know the ratio is RATIO_GIRLS:RATIO_BOYS, there must be FACTOR groups of RATIO_BOYS boys each.

There is a total of NUM_BOYS boys in course( 1 ) class.

If there are NUM_BOYS boys, how many girls are there?

NUM_GIRLS girls

A ratio of RATIO_GIRLS girls to RATIO_BOYS boys means that there is a group of RATIO_GIRLS girls for every group of RATIO_BOYS boys.

If there are NUM_BOYS boys, then there are FACTOR groups of RATIO_BOYS boys each.

Because we know the ratio is RATIO_GIRLS:RATIO_BOYS, there must be FACTOR groups of RATIO_GIRLS girls each.

There is a total of NUM_GIRLS girls in course( 1 ) class.

If there are a total of TOTAL students, how many girls are there?

NUM_GIRLS girls

A ratio of RATIO_GIRLS girls to RATIO_BOYS boys means that a set of RATIO_GIRLS + RATIO_BOYS students will have RATIO_GIRLS girls and RATIO_BOYS boys.

A class of TOTAL students has FACTOR sets of RATIO_GIRLS + RATIO_BOYS students.

Because we know that there are RATIO_GIRLS girls in each set of RATIO_GIRLS + RATIO_BOYS students, the class must have FACTOR groups of RATIO_GIRLS girls each.

There is a total of NUM_GIRLS girls in course( 1 ) class.

If there are a total of TOTAL students, how many boys are there?

NUM_BOYS boys

A ratio of RATIO_GIRLS girls to RATIO_BOYS boys means that a set of RATIO_GIRLS + RATIO_BOYS students will have RATIO_GIRLS girls and RATIO_BOYS boys.

A class of TOTAL students has FACTOR sets of RATIO_GIRLS + RATIO_BOYS students.

Because we know that there are RATIO_BOYS boys in each set of RATIO_GIRLS + RATIO_BOYS students, the class must have FACTOR groups of RATIO_BOYS boys each.

There is a total of NUM_BOYS boys in course( 1 ) class.

randRange( 1, 10 ) randRange( 1, 10 ) randRange( 2, 10 ) FACTOR * SCALE_MAP FACTOR * SCALE_REAL

The scale on a map is SCALE_MAPcm : SCALE_REALkm.

If two cities are DISTANCE_MAPcm apart on the map, what is the actual distance in km between the two cities?

DISTANCE_REAL km

The scale means that every SCALE_MAPcm on the map corresponds to an actual distance of SCALE_REALkm.

A distance of DISTANCE_MAPcm on the map is the same as FACTOR \cdot SCALE_MAPcm.

The actual distance between the two cities is FACTOR \cdot SCALE_REALkm, or DISTANCE_REALkm.

If the distance between two cities is DISTANCE_REALkm, how far apart in cm are the two cities on the map?

DISTANCE_MAP cm

The scale means that every SCALE_MAPcm on the map corresponds to an actual distance of SCALE_REALkm.

An actual distance of DISTANCE_REALkm is the same as FACTOR \cdot SCALE_REALkm.

The distance between the two cities on the map is FACTOR \cdot SCALE_MAPcm, or DISTANCE_MAPcm.