Skip to main content
Logo image

PreTeXt Sample Book Abstract Algebra (SAMPLE ONLY)

Exercises 3.18 Fill-In Exercises (Old Style)

View Source for exercises
                    <exercises xml:id="fill-in-exercises-old">

                    <title>Fill-In Exercises (Old Style)</title>

                    <introduction>

                      <p>
This section has <term>fill-in-the-blank</term> (<init>FITB</init>) exercises that use an old syntax.  They were designed for projects transitioning from Runestone's ReST syntax to <pretext/>.  So they are really only here for testing, and not for any sort of documentation.  They will not receive support or enhancements.  <foreign>Caveat emptor</foreign>.
                      </p>

                    </introduction>

                    <exercise label="fillin-integer">

                      <title>Fill-In, Integer Answer</title>

                      <statement>

                        <p>
The game of bowling uses <var width="28"/> pins that you try to knock down. (This answer blank has been set to be very wide.)
                        </p>

                      </statement>

                      <setup> <var> <condition number="10">

                      <feedback>

                        <p>
Arranged in a triangle, there are <m>1+2+3+4 = 10</m> pins, a so-called <term>triangular</term> number.
                        </p>

                      </feedback>

                      </condition> <condition number="16">

                      <feedback>

                        <p>

                          <em>Close</em>! You may have used hexadecimal notation, when you did not really mean to.

                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Incorrect.
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>

                    <exercise label="fillin-string-integer">

                      <title>Fill-In, String and Number Answers</title>

                      <statement>

                        <p>
Complete the following line of a Python program so that it will declare an integer variable <c>age</c> with an initial value of <c>5</c>. (These two answer blanks have been set to be very short.)
                        </p>

                        <p>

                          <var width="2"/> <c>age = </c> <var width="3"/><c>;</c>

                        </p>

                      </statement>

                      <setup> <var> <condition string="int">

                      <feedback>

                        <p>
A variable of type <c>int</c> is appropriate for whole number ages.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Remember that Java uses just the first three letters of the word <q>integer</q> to define an integral type.
                        </p>

                      </feedback>

                      </condition> </var> <var> <condition number="5">

                      <feedback>

                        <p>
An integer variable may be initialized to a value.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Use <c>5</c> as the initial value of the variable.
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>

                    <exercise label="fillin-case-insensitive">

                      <title>Fill-In, Case-Insensitive Answer</title>

                      <statement>

                        <p>
The word <var/> is the opposite of <q>yes</q>.  (Try a mixture of upper and lower-case letters.)
                        </p>

                      </statement>

                      <setup> <var case="insensitive"> <!-- Note, no "p" in "feedback" --> <condition string="no">

                      <feedback>
The correct answers are  no, No, nO, and NO.
                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>
Incorrect.
                      </feedback>

                      </condition> </var> </setup>

                    </exercise>

                    <exercise label="fillin-decimal">

                      <title>Fill-In, Decimal Answer</title>

                      <statement>

                        <p>
The decimal number <var/> is an approximation of <m>\sfrac{1}{3}</m> to within three significant figures.  (<url href="https://en.wikipedia.org/wiki/Significant_figures" visual="en.wikipedia.org/wiki/Significant_figures">Wikipedia</url>).
                        </p>

                      </statement>

                      <setup> <var> <!-- Note, no "p" in "feedback" --> <condition number="0.333" tolerance="0.0005">

                      <feedback>

                        <p>
Any value in the interval <m>0.333\pm 0.0005</m> is correct.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Incorrect. Did you provide three <em>significant figures</em>?
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>

                    </exercises>
This section has fill-in-the-blank (FITB) exercises that use an old syntax. They were designed for projects transitioning from Runestoneโ€™s ReST syntax to PreTeXt. So they are really only here for testing, and not for any sort of documentation. They will not receive support or enhancements. Caveat emptor.

1. Fill-In, Integer Answer.

View Source for exercise
                    <exercise label="fillin-integer">

                      <title>Fill-In, Integer Answer</title>

                      <statement>

                        <p>
The game of bowling uses <var width="28"/> pins that you try to knock down. (This answer blank has been set to be very wide.)
                        </p>

                      </statement>

                      <setup> <var> <condition number="10">

                      <feedback>

                        <p>
Arranged in a triangle, there are <m>1+2+3+4 = 10</m> pins, a so-called <term>triangular</term> number.
                        </p>

                      </feedback>

                      </condition> <condition number="16">

                      <feedback>

                        <p>

                          <em>Close</em>! You may have used hexadecimal notation, when you did not really mean to.

                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Incorrect.
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>
The game of bowling uses pins that you try to knock down. (This answer blank has been set to be very wide.)

2. Fill-In, String and Number Answers.

View Source for exercise
                    <exercise label="fillin-string-integer">

                      <title>Fill-In, String and Number Answers</title>

                      <statement>

                        <p>
Complete the following line of a Python program so that it will declare an integer variable <c>age</c> with an initial value of <c>5</c>. (These two answer blanks have been set to be very short.)
                        </p>

                        <p>

                          <var width="2"/> <c>age = </c> <var width="3"/><c>;</c>

                        </p>

                      </statement>

                      <setup> <var> <condition string="int">

                      <feedback>

                        <p>
A variable of type <c>int</c> is appropriate for whole number ages.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Remember that Java uses just the first three letters of the word <q>integer</q> to define an integral type.
                        </p>

                      </feedback>

                      </condition> </var> <var> <condition number="5">

                      <feedback>

                        <p>
An integer variable may be initialized to a value.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Use <c>5</c> as the initial value of the variable.
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>
Complete the following line of a Python program so that it will declare an integer variable age with an initial value of 5. (These two answer blanks have been set to be very short.)
age = ;

3. Fill-In, Case-Insensitive Answer.

View Source for exercise
                    <exercise label="fillin-case-insensitive">

                      <title>Fill-In, Case-Insensitive Answer</title>

                      <statement>

                        <p>
The word <var/> is the opposite of <q>yes</q>.  (Try a mixture of upper and lower-case letters.)
                        </p>

                      </statement>

                      <setup> <var case="insensitive"> <!-- Note, no "p" in "feedback" --> <condition string="no">

                      <feedback>
The correct answers are  no, No, nO, and NO.
                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>
Incorrect.
                      </feedback>

                      </condition> </var> </setup>

                    </exercise>
The word is the opposite of โ€œyesโ€. (Try a mixture of upper and lower-case letters.)

4. Fill-In, Decimal Answer.

View Source for exercise
                    <exercise label="fillin-decimal">

                      <title>Fill-In, Decimal Answer</title>

                      <statement>

                        <p>
The decimal number <var/> is an approximation of <m>\sfrac{1}{3}</m> to within three significant figures.  (<url href="https://en.wikipedia.org/wiki/Significant_figures" visual="en.wikipedia.org/wiki/Significant_figures">Wikipedia</url>).
                        </p>

                      </statement>

                      <setup> <var> <!-- Note, no "p" in "feedback" --> <condition number="0.333" tolerance="0.0005">

                      <feedback>

                        <p>
Any value in the interval <m>0.333\pm 0.0005</m> is correct.
                        </p>

                      </feedback>

                      </condition> <condition string=".*">

                      <feedback>

                        <p>
Incorrect. Did you provide three <em>significant figures</em>?
                        </p>

                      </feedback>

                      </condition> </var> </setup>

                    </exercise>
The decimal number is an approximation of \(\sfrac{1}{3}\) to within three significant figures. (Wikipedia).