WeBWorK Main Forum

Why scientific notation requires "X" instead of "*" for multiplication? Aren't students conditioned to use "*" everywhere?

Why scientific notation requires "X" instead of "*" for multiplication? Aren't students conditioned to use "*" everywhere?

by Christian Seberino -
Number of replies: 1
I noticed you can't create a problem that requires scientific notation nor
enter an answer in scientific notation without using "X" instead of "*"
for multiplication.

Why? Aren't students expecting to use "*" since that is what they use
everywhere else for multiplication?

cs


DOCUMENT();
loadMacros(
"PGstandard.pl",
"PGML.pl",
"MathObjects.pl",
"PGcourse.pl",
"parserNumberWithUnits.pl",
"contextArbitraryString.pl",
"parserPopUp.pl",
"contextInequalities.pl",
"contextScientificNotation.pl",
);
TEXT(beginproblem());
$showPartialCorrectAnswers = 1;
######################################################################

Context("ScientificNotation");

BEGIN_PGML

See if you can enter 1230 in scientific notation.

[____________]{Compute("1.23 x 10**3")}
END_PGML

######################################################################
ENDDOCUMENT();

In reply to Christian Seberino

Re: Why scientific notation requires "X" instead of "*" for multiplication? Aren't students conditioned to use "*" everywhere?

by Davide Cervone -
It's because that's what the person who requested this context required. It was designed for use in a high-school course where the notational requirements were very strict.

If you want to use * for the multiplication, you can add it into the context as follows:

    Context("ScientificNotation");
    Context()->operators->add(
         '*' => {precedence => 3, associativity => 'left', type => 'bin',
                    TeX => '\times ', class => 'ScientificNotation::BOP::x'},
    );
so you can enter 1.23*10^3, but the output will still show the x. Changing that would require using a subclass of the Scientific notation class, and that is a bit more work.

Also, note that you don't have to use Compute() for your PGML. You could just use

    BEGIN_PGML
    See if you can enter 1230 in scientific notation.

    [____________]{"1.23 x 10**3"}
    END_PGML
to get the same effect.