## DESCRIPTION
## 
## ENDDESCRIPTION

## DBsubject(Algebra)
## DBchapter(Functions)
## DBsection(Interpretation and applications)
## Date(06/06/2017)
## Institution(Red Rocks Community College, Colorado Community College System)
## Author(Adam Forland)
## MO(1)
## KEYWORDS('algebra','average rate of change')


###########################
#  Initialization

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
"niceTables.pl",
"PGML.pl",
"PGcourse.pl",
);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1;


###########################
#  Setup

$a = random(20700,20850,1);
$b = random(21250,21400,1);
$c = random(10, 15,.5);

Context("Numeric");

$ans1 = Compute(($b -$a)/$c );


###########################
#  Main text


BEGIN_TEXT
At the start of a trip, the odometer on a car read
$a miles. At the end of the trip, $c hours later, the
odometer read $b miles.
$BR
$BR
What is the average speed the
car traveled during this trip? \{ans_rule{20}\} miles/hour
$BR

END_TEXT

############################
#  Answer evaluation


install_problem_grader(~~&std_problem_grader);

$showPartialCorrectAnswers = 1;

ANS($ans1->cmp()  );


############################
#  Solution

#BEGIN_PGML_SOLUTION
#Solution explanation goes here.
#END_PGML_SOLUTION

COMMENT('MathObject version. Uses PGML.');

ENDDOCUMENT();