ExactNoTrig

From WeBWorK_wiki
Jump to navigation Jump to search

exact_no_trig

Description

This is a standard number evaluator which does not allow the trig functions sin, cos, tan, sec, csc, cot in the answer, and does not allow a decimal answer. Useful if you want to require an answer of the form 1/sqrt(2) or pi/2.

Syntax

exact_no_trig(ans_string)

Params

ans_string: A string which evaluates to a number

Action

Produces an answer evaluator which checks student's answer as a number. Student's answer cannot contain one of the trig functions or a decimal point

Returns

an answer evaluator