QuestionObject
✖
QuestionObject
Details and Options


- A QuestionObject is displayed as an interactive form in which answers are submitted and assessed.
- A QuestionObject is commonly created in a Question Notebook, available with CreateNotebook["QuestionNotebook"].
- In QuestionObject[q,assess], q accepts the following form:
-
"question" text prompt asking a question QuestionInterface[type,specs] a QuestionInterface object - The assessment assess accepts the following forms:
-
AssessmentFunction[…] assessment function <… > Association defining a valid key for AssessmentFunction f test function - The test function f should be a function that takes the submitted answer returns an assessment, either as True, False or as an AssessmentResultObject.
- Supported interface types are listed Question Interface Types and include:
-
"ChooseMultiple" select any number of items from a defined list "ClickLocations" locate an item on a graphical interface "Code" enter code using an input field "DragCategorize" group items into categories using a drag-and-drop interface "DragCompletion" drag items from a pool to fill in blanks "MultipleShortAnswers" enter multiple answers into input fields "MultipleChoice" select a correct answer from a list "MultipleChoiceGrid" group items into categories using a table "NumericRange" choose a value from within a range "SelectPair" match an item with a category "SelectColor" choose a color "SelectCompletion" choose text to fill in a blank "ShortAnswer" enter an answer using an input field "Sort" order a list using a drag-and-drop interface "TextCompletion" type text to fill in a blank "TrueFalse" determine whether a question is true or false
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (17)Survey of the scope of standard use cases
Create a categorization question:

https://wolfram.com/xid/0rtfzoju6-redngx

Specify a test function to assess the answer:

https://wolfram.com/xid/0rtfzoju6-4hk2ka

Create a question where multiple answers may be chosen:

https://wolfram.com/xid/0rtfzoju6-fqw57x

Create a "ShortAnswer" question for assessing a free-form textual answer:

https://wolfram.com/xid/0rtfzoju6-lo2002

Create a "MultipleChoice" question for selecting a single correct answer from a list of choices:

https://wolfram.com/xid/0rtfzoju6-9qf0t7

Create a "MultipleShortAnswers" question to assess many free-form answers:

https://wolfram.com/xid/0rtfzoju6-re5lof

Create a "TextCompletion" question to assess free-form fill-in-the-blank answers:

https://wolfram.com/xid/0rtfzoju6-70egfe

Create a "SelectCompletion" question to select from a set of predefined answers for each blank:

https://wolfram.com/xid/0rtfzoju6-m5toi4

Create a "DragCompletion" question to fill blanks from a common pool of predefined answers:

https://wolfram.com/xid/0rtfzoju6-e4unpa

Create a "ClickLocations" question for locating items in a photo:

https://wolfram.com/xid/0rtfzoju6-f1yro8

https://wolfram.com/xid/0rtfzoju6-09qnxi

Create a "Sort" question for ordering items in a list:

https://wolfram.com/xid/0rtfzoju6-uw1xe4

Create a "NumericRange" question for choosing a value within an interval:

https://wolfram.com/xid/0rtfzoju6-pnfu43

Create a "SelectPair" question for matching one item with a category:

https://wolfram.com/xid/0rtfzoju6-8ts69s

Create a "SelectColor" question for assessing a color choice:

https://wolfram.com/xid/0rtfzoju6-8h8700

Create a "MultipleChoiceGrid" question for categorizing multiple items into common categories by selecting radio buttons:

https://wolfram.com/xid/0rtfzoju6-fm4wn1

Create a "DragCategorize" question for categorizing multiple items into common categories by dragging the items:

https://wolfram.com/xid/0rtfzoju6-gozz0w

Create a "Code" question for assessing whether submitted code is equivalent to the code in the answer key:

https://wolfram.com/xid/0rtfzoju6-8cein3
Generalizations & Extensions (1)Generalized and extended use cases
Create a test function that returns an AssessmentResultObject where the score is a function of the answer:

https://wolfram.com/xid/0rtfzoju6-lhjx1t

https://wolfram.com/xid/0rtfzoju6-mvpkk7

Applications (1)Sample problems that can be solved with this function
Define a function that generates random versions of a question:

https://wolfram.com/xid/0rtfzoju6-3ll1t1
Generate two versions of the question:

https://wolfram.com/xid/0rtfzoju6-uysdq7


https://wolfram.com/xid/0rtfzoju6-fj5tp6

Create an equivalent QuestionGenerator:

https://wolfram.com/xid/0rtfzoju6-nnzqov


https://wolfram.com/xid/0rtfzoju6-efy7wh

Properties & Relations (2)Properties of the function, and connections to other functions
Wolfram Research (2021), QuestionObject, Wolfram Language function, https://reference.wolfram.com/language/ref/QuestionObject.html.
Text
Wolfram Research (2021), QuestionObject, Wolfram Language function, https://reference.wolfram.com/language/ref/QuestionObject.html.
Wolfram Research (2021), QuestionObject, Wolfram Language function, https://reference.wolfram.com/language/ref/QuestionObject.html.
CMS
Wolfram Language. 2021. "QuestionObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/QuestionObject.html.
Wolfram Language. 2021. "QuestionObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/QuestionObject.html.
APA
Wolfram Language. (2021). QuestionObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/QuestionObject.html
Wolfram Language. (2021). QuestionObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/QuestionObject.html
BibTeX
@misc{reference.wolfram_2025_questionobject, author="Wolfram Research", title="{QuestionObject}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/QuestionObject.html}", note=[Accessed: 26-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_questionobject, organization={Wolfram Research}, title={QuestionObject}, year={2021}, url={https://reference.wolfram.com/language/ref/QuestionObject.html}, note=[Accessed: 26-March-2025
]}