in2lambda.api.response_area.Number¶

class in2lambda.api.response_area.Number(*, answer: int | float | None = None, evaluation_function: str = <default>, grade_params: dict[str, ~typing.Any] | None=None, pre_text: str = '', post_text: str = '', content_after: str = '', check_button_text: str = '', input_symbols: list[InputSymbol] = <factory>, display_input_symbols: bool = <default>, live_preview: bool = <default>, include_in_pdf: bool = <default>, save_allowed: bool = <default>, separate_feedback: bool = <default>, common_feedback_color: str = <default>, correct_feedback_color: str = <default>, correct_feedback_prefix: str = <default>, incorrect_feedback_color: str = <default>, incorrect_feedback_prefix: str = <default>, tests: list[Test] = <factory>, accept: list[Any] = <factory>, reject: list[Any] = <factory>, cases: list[Case] = <factory>)[source]¶

Bases: ResponseArea

A number.

__init__(*, answer: int | float | None = None, evaluation_function: str = <default>, grade_params: dict[str, ~typing.Any] | None=None, pre_text: str = '', post_text: str = '', content_after: str = '', check_button_text: str = '', input_symbols: list[InputSymbol] = <factory>, display_input_symbols: bool = <default>, live_preview: bool = <default>, include_in_pdf: bool = <default>, save_allowed: bool = <default>, separate_feedback: bool = <default>, common_feedback_color: str = <default>, correct_feedback_color: str = <default>, correct_feedback_prefix: str = <default>, incorrect_feedback_color: str = <default>, incorrect_feedback_prefix: str = <default>, tests: list[Test] = <factory>, accept: list[Any] = <factory>, reject: list[Any] = <factory>, cases: list[Case] = <factory>) → None¶

Methods

__init__(*, answer, evaluation_function, ...)

Attributes

answer

check_button_text

Replaces the label of the check button; left out of the JSON when empty.

common_feedback_color

content_after

Markdown shown after the box, before the next one.

correct_feedback_color

correct_feedback_prefix

display_input_symbols

evaluation_function

grade_params

include_in_pdf

incorrect_feedback_color

incorrect_feedback_prefix

live_preview

payload_types

The types a test payload, a sample response, may take.

post_text

pre_text

response_type

save_allowed

separate_feedback

input_symbols

tests

accept

Responses that must be marked correct; each is written as a passing test.

reject

Responses that must be marked incorrect; each is written as a failing test.

cases

accept: list[Any]¶

Responses that must be marked correct; each is written as a passing test.

check_button_text: str = ''¶

Replaces the label of the check button; left out of the JSON when empty.

content_after: str = ''¶

Markdown shown after the box, before the next one.

payload_types: ClassVar[tuple[type, ...]] = (<class 'int'>, <class 'float'>)¶

The types a test payload, a sample response, may take.

reject: list[Any]¶

Responses that must be marked incorrect; each is written as a failing test.