We have some (6) problems like that in our library that is currently in the Contrib folder (not yet assimilated into the actual OPL.) To access them, see here:
http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3320
The problems live in BasicAlgebra/NumberBasics and are called TypesOfNumbersxx.pg. As I just opened them, I note that the commentary at the top is not relevant. The problems have the structures:
- Which of the following are whole numbers? checkboxes
- Which of the following are integers? checkboxes
- Which of the following are rational numbers? checkboxes
- Which of the following are irrational numbers? checkboxes
- Which of the following are real numbers? checkboxes
- Give an example of
- a whole number that is not an integer. If no such number exists, enter *DNE* or *NONE*.
- an integer that is not a whole number. If no such number exists, enter *DNE* or *NONE*.
- a rational number that is not an integer. If no such number exists, enter *DNE* or *NONE*.
- an irrational number.
- an irrational number that is also an integer. If no such number exists, enter *DNE* or *NONE*.
In the last one, the fourth part checks the continued fraction of the student's answer and if it extends deep enough, the number is declared to be irrational. This can make for some false positives and negatives (that are very unlikely to be entered by students.)