summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/moodle/test/utf8ref/test_minted-moodle.ref
blob: 2233aa214e901a371bfb40e774ff05ae3a2e4a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="UTF-8"?>

<quiz>
 
<question type="category">
  <category>
    <text>$course$/top/Minted</text>
  </category>
</question>
 
<question type="numerical">
  <name format="html">
    <text><![CDATA[LaTeX Classes]]></text>
  </name>
  <questiontext format="html">
    <text><![CDATA[<p>In the following \(\rm\LaTeX\) code excerpt, on which line is the class loaded? <PRE style="border-top: thin solid; border-bottom: thin solid"><CODE><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">2</span><span style="color: #177500">% !TEX TS-program = xelatex</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">2</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">&nbsp;</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">3</span><span style="color: #A90D91">\documentclass{</span>article<span style="color: #A90D91">}</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">3</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">4</span><span style="color: #A90D91">\usepackage</span><span style="color: #836C28">[nostamp]</span><span style="color: #A90D91">{</span>moodle<span style="color: #A90D91">}</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">4</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">5</span><span style="color: #A90D91">\newif\iffvextra</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">5</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">6</span><span style="color: #A90D91">\fvextratrue</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">6</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">7</span><span style="color: #A90D91">\ifxetex</span> <span style="color: #177500">% FOR XELATEX</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">7</span><BR/></CODE></PRE> </p>]]></text>
  </questiontext>
  <defaultgrade>1.0</defaultgrade>
  <generalfeedback format="html"><text/></generalfeedback>
  <penalty>0.10</penalty>
  <hidden>0</hidden>
  <answer fraction="100" format="plain_text">
    <text>4</text>
    <tolerance>0</tolerance>
    <feedback format="html"><text><![CDATA[<p>yes! <PRE style="border-top: thin solid; border-bottom: thin solid"><CODE><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">2</span><span style="color: #177500">% !TEX TS-program = xelatex</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">2</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">&nbsp;</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">3</span><mark><span style="color: #A90D91">\documentclass{</span>article<span style="color: #A90D91">}</span></mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">3</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">4</span><span style="color: #A90D91">\usepackage</span><span style="color: #836C28">[nostamp]</span><span style="color: #A90D91">{</span>moodle<span style="color: #A90D91">}</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">4</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">5</span><span style="color: #A90D91">\newif\iffvextra</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">5</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">6</span><span style="color: #A90D91">\fvextratrue</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">6</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">7</span><span style="color: #A90D91">\ifxetex</span> <span style="color: #177500">% FOR XELATEX</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">7</span><BR/></CODE></PRE></p>]]></text></feedback>
  </answer>
  <answer fraction="0" format="plain_text">
    <text>3</text>
    <tolerance>0</tolerance>
    <feedback format="html"><text><![CDATA[<p>No. On line 3, there is only a comment.</p>]]></text></feedback>
  </answer>
  <answer fraction="0" format="plain_text">
    <text>5</text>
    <tolerance>0</tolerance>
    <feedback format="html"><text><![CDATA[<p>No. On line 5, the package <CODE>moodle</CODE> is loaded.</p>]]></text></feedback>
  </answer>
</question>
<question type="multichoice">
  <name format="html">
    <text><![CDATA[Languages]]></text>
  </name>
  <questiontext format="html">
    <text><![CDATA[<p>Select the code written in the Python language. </p>]]></text>
  </questiontext>
  <defaultgrade>1.0</defaultgrade>
  <generalfeedback format="html"><text/></generalfeedback>
  <penalty>0.10</penalty>
  <hidden>0</hidden>
  <single>true</single>
  <shuffleanswers>1</shuffleanswers>
  <answernumbering>abc</answernumbering>
  <answer fraction="100" format="html">
    <text><![CDATA[<p><PRE style="border-top: thin solid; border-bottom: thin solid"><CODE><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">2</span><mark><span style="color: #A90D91">if</span> <span style="color: #000000">n</span> <span style="color: #000000">&lt;</span> <span style="color: #1C01CE">0</span>:</mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">2</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">3</span>    <span style="color: #A90D91">raise</span> <span style="color: #000000">ValueError</span>(<span style="color: #C41A16">&#39;non negative integer expected&#39;</span>)<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">3</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">&nbsp;</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">4</span><mark><span style="color: #000000">fact</span> <span style="color: #000000">=</span> <span style="color: #1C01CE">1</span></mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">4</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">&nbsp;</span><mark></mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">5</span><mark><span style="color: #A90D91">for</span> <span style="color: #000000">i</span> <span style="color: #000000">in</span> <span style="color: #A90D91">range</span>(<span style="color: #1C01CE">2</span>, <span style="color: #000000">n</span> <span style="color: #000000">+</span> <span style="color: #1C01CE">1</span>):</mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">5</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">6</span>    <span style="color: #000000">fact</span> <span style="color: #000000">*=</span> <span style="color: #000000">i</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">6</span><BR/></CODE></PRE></p>]]></text>
    <feedback format="html"><text><![CDATA[<p>Indeed, this is Python code.</p>]]></text></feedback>
  </answer>
  <answer fraction="0" format="html">
    <text><![CDATA[<p><PRE style="border-top: thin solid; border-bottom: thin solid"><CODE><span style="color: #888888">#!/usr/bin/XXXX</span><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">1</span><BR/><mark><span style="color: #008800; font-weight: bold">use</span> <span style="color: #0e84b5; font-weight: bold">strict</span>;</mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">2</span><BR/><span style="color: #008800; font-weight: bold">use</span> <span style="color: #0e84b5; font-weight: bold">warnings</span>;<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">3</span><BR/><mark><span style="color: #008800; font-weight: bold">use</span> <span style="color: #0e84b5; font-weight: bold">IO::Handle</span>;</mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">4</span><BR/><mark></mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><mark><span style="color: #008800; font-weight: bold">my</span> ( <span style="color: #996633">$remaining</span>, <span style="color: #996633">$tot</span> );</mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">5</span><BR/><mark></mark><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="color: #996633">$remaining</span> <span style="color: #333333">=</span> <span style="color: #996633">$tot</span> <span style="color: #333333">=</span> <span style="color: #007020">shift</span>(<span style="color: #996633">@ARGV</span>);<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">6</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="color: #007020">STDOUT</span><span style="color: #333333">-&gt;</span>autoflush(<span style="color: #0000DD; font-weight: bold">1</span>);<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">7</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="color: #008800; font-weight: bold">while</span> ( <span style="color: #996633">$remaining</span> ) {<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">8</span><BR/>  <span style="color: #007020">printf</span> ( <span style="background-color: #fff0f0">&quot;Remaining %s/%s \r&quot;</span>, <span style="color: #996633">$remaining</span><span style="color: #333333">--</span>, <span style="color: #996633">$tot</span> );<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">9</span><BR/>  <span style="color: #007020">sleep</span> <span style="color: #0000DD; font-weight: bold">1</span>;<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">10</span><BR/>}<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">11</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">&nbsp;</span><BR/><span style="color: #008800; font-weight: bold">print</span> <span style="background-color: #fff0f0">&quot;\n&quot;</span>;<span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: left; float: right">12</span><BR/></CODE></PRE></p>]]></text>
    <feedback format="html"><text><![CDATA[<p>No. This is Perl code.</p>]]></text></feedback>
  </answer>
  <answer fraction="0" format="html">
    <text><![CDATA[<p><PRE style="border-top: thin solid; border-bottom: thin solid"><CODE><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">1</span><span style="color: #204a87; font-weight: bold">long</span> <span style="color: #000000">some_function</span><span style="color: #000000; font-weight: bold">();</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">2</span><mark><span style="color: #8f5902; font-style: italic">/* int */</span> <span style="color: #000000">other_function</span><span style="color: #000000; font-weight: bold">();</span></mark><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">3</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">4</span><mark><span style="color: #8f5902; font-style: italic">/* int */</span> <span style="color: #000000">calling_function</span><span style="color: #000000; font-weight: bold">()</span></mark><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">5</span><span style="color: #000000; font-weight: bold">{</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">6</span>    <span style="color: #204a87; font-weight: bold">long</span> <span style="color: #000000">test1</span><span style="color: #000000; font-weight: bold">;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">7</span><mark>    <span style="color: #204a87; font-weight: bold">register</span> <span style="color: #8f5902; font-style: italic">/* int */</span> <span style="color: #000000">test2</span><span style="color: #000000; font-weight: bold">;</span></mark><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">8</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">9</span>    <span style="color: #000000">test1</span> <span style="color: #ce5c00; font-weight: bold">=</span> <span style="color: #000000">some_function</span><span style="color: #000000; font-weight: bold">();</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">10</span>    <span style="color: #204a87; font-weight: bold">if</span> <span style="color: #000000; font-weight: bold">(</span><span style="color: #000000">test1</span> <span style="color: #ce5c00; font-weight: bold">&gt;</span> <span style="color: #0000cf; font-weight: bold">0</span><span style="color: #000000; font-weight: bold">)</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">11</span>          <span style="color: #000000">test2</span> <span style="color: #ce5c00; font-weight: bold">=</span> <span style="color: #0000cf; font-weight: bold">0</span><span style="color: #000000; font-weight: bold">;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">12</span>    <span style="color: #204a87; font-weight: bold">else</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">13</span>          <span style="color: #000000">test2</span> <span style="color: #ce5c00; font-weight: bold">=</span> <span style="color: #000000">other_function</span><span style="color: #000000; font-weight: bold">();</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">14</span>    <span style="color: #204a87; font-weight: bold">return</span> <span style="color: #000000">test2</span><span style="color: #000000; font-weight: bold">;</span><BR/><span style="font-size: 80%; background-color: #f0f0f0; padding: 0 5px 0 5px; display: inline-block; width: 16pt; text-align: right">15</span><span style="color: #000000; font-weight: bold">}</span><BR/></CODE></PRE></p>]]></text>
    <feedback format="html"><text><![CDATA[<p>No. This is C code.</p>]]></text></feedback>
  </answer>
</question>
 
</quiz>