WeBWorK Problems

List of Intervals

Re: List of Intervals

by Davide Cervone -
Number of replies: 0
You can also make lists of intervals using:
    $ans = Compute("(-inf,$a),($b,inf)");
which has the advantage of making what you type be in the same format as what students type. You do not have to use the List and Interval constructors, though there is nothing wrong with doing so if you prefer.

In the case where you use "NONE" as the answer, you might want to do

so that you can get list-style error messages with type-checking appropriate for intervals.