# Khan/khan-exercises

Updated vehicle speeds to be more realistic

`Fix #9942, Fix #9747`
Christi committed Dec 31, 2011
1 parent f118cef commit 670482f94c300e9642568c8799f8fdfe638db443
Showing with 25 additions and 8 deletions.
1. +25 −8 exercises/rate_problems_1.html
 @@ -8,23 +8,40 @@
- 11 + rand(9) - 41 + rand(9) - 31 + rand(9) - 1 + rand(9) + vehicle(1) + vehicle(2) + + + function(vehicletype) { + if (vehicletype === "bike") { + return randRange(5, 15); + } else if (vehicletype ==="horse") { + return randRange(3, 30); + } else if (vehicletype ==="train") { + return randRange(30, 70); + } else { + return randRange(10, 65); + } + } + + + REASONABLESPEED(VEHC1) + REASONABLESPEED(VEHC2) + SPEED1 < SPEED2 ? randRange(SPEED1 + 1, SPEED2 - 1) : randRange(SPEED2 + 1, SPEED1 - 1) + randRange(1, 9) AVG * TIME (SPEED1 * SPEED2 * TIME - DIST * SPEED2) / (SPEED1 - SPEED2) DIST - DIST2 -
+
-

person(1) traveled by vehicle(1) at an average speed of SPEED1 miles per hour.

-

Then, he(1) traveled by vehicle(2) at an average speed of SPEED2 miles per hour.

+

person(1) traveled by VEHC1 at an average speed of SPEED1 miles per hour.

+

Then, he(1) traveled by VEHC2 at an average speed of SPEED2 miles per hour.

In total, he(1) traveled DIST miles for plural(TIME, "hour").

-

How many miles did person(1) travel by vehicle(1)? (Round to the nearest mile.)

+

How many miles did person(1) travel by VEHC1? (Round to the nearest mile.)

round(DIST1)

d_vehicleVar(1) = round(DIST1) miles