summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/jeopardy/example/game4.tex
blob: dc2e110706f3ff84349246d0d0378bceb8921921 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
\documentclass{article}
\usepackage{amsmath}
\usepackage[pdftex,designi]{web}
\usepackage[pdftex]{exerquiz}
\usepackage[pdftex]{eforms}
\usepackage[ImplMulti]{dljslib}

\everymath{\displaystyle}
\parindent 0pt
\definecolor{pozadi}{rgb}{1,1,0.9}
\pagecolor{pozadi}

\usepackage[picture,finetune]{jeopardy}
\def\JeopardyPictureFile{aleq.jpg}
\def\ChampionMsg{Niels Abel and Evariste Galois}

\def\logoB{\rotatebox{90}{%
    \vbox{\normalsize\hbox{\color{red}{Robert Ma\v{r}\'{i}k}}
      \hbox{\color{green}Jeopardy game}}}
  \vfill}

\let\rmdefault\sfdefault
\hypersetup{pdfpagemode=Window, pdfnewwindow=true, pdfmenubar=true,%
  pdftoolbar=true,colorlinks,  pdfwindowui=false,
  pdfpagemode=Window}
\pagestyle{empty}

\begin{insDLJS}[dljslibRMbbbb]{dljsliRMbbbb}{RMbbbb}


function ProcRespSetFormulaEmpty(flag,CorrAns,n,epsilon,a,indepVar,oComp)
{
    ok2Continue = true;
    if (!ProcessIt) return null;
    var fieldname = event.target.name;
    var UserAns = event.value;
    this.getField(fieldname).strokeColor = \eqDefaultColor;
    UserAns = stripWhiteSpace(UserAns);
    if (!ok2Continue) return null;
    if (UserAns == "empty") {
      success = (CorrAns == UserAns);
      return notifyField(success, flag, fieldname);
    }
    if (CorrAns == "empty") {
      success = (CorrAns == UserAns);
      return notifyField(success, flag, fieldname);
    }
    var aUserAns = UserAns.split(",");
    var aCorrAns = CorrAns.split(",");
    var numCorrect = 0;
    var match = 0;
    if ( aUserAns.length != aCorrAns.length ) return notifyField(false, flag, fieldname);
    for ( var i=0; i< aCorrAns.length; i++) {
        match = 0;
        for ( var j=i; j< aUserAns.length; j++) {
            var retn = _ProcResp(flag,aCorrAns[i],aUserAns[j],n,epsilon,a,indepVar,oComp);
            if ( retn == null ) return syntaxError(), null;
            if (retn==1) {
               var temp=aUserAns[j];
               aUserAns[j]=aUserAns[i];
               aUserAns[i]=temp;
               match = match + 1;
            }
        }
        numCorrect += (match) ? 1 : 0;
    }
    var success = (numCorrect == aCorrAns.length) ? true : false;
    if ( success == null ) return syntaxError(), null;
    return notifyField(success, flag, fieldname);
}

\end{insDLJS}


\def\quest#1#2{
  \begin{question}
    Solve the equation in the set of \textit{real} numbers.
    \begin{equation*}
      #1=0
    \end{equation*}
    \bigskip
    \begin{itemize}
    \item Write the solution into the field.
    \item If there is no solution, write the word \textit{empty}.
    \end{itemize}
    \bigskip
    $x={}$\RespBoxMath{#2}{10}{1.0E-2}{0}{1}*{ProcRespSetFormulaEmpty}
  \end{question}
}

\title{Algebraic equations}

%\def\title{Algebraic equations}

\author{Robert Ma\v r\'\i k}

\begin{document}

\maketitle
You will solve algebraic equations. Write the solutions as comma
separated list, In the case of repeted solution write each solution
only \textbf{once}!

\SetGameWidth{0.5\linewidth}
\Celltoks{\BC{}\BG{1 1 1}}
\AditionalShift=4.6pt

\newpage
\MakeGameBoard
\begin{category}{Linear}
  \quest{x+1}{-1}
  \quest{2x-3}{3/2}
  \quest{5x+15}{-3}
  \quest{7x+13}{-13/7}
  \quest{3x+1}{-1/3}
  \quest{2x+7}{-7/2}
  \quest{5x-6}{6/5}
  \quest{7x-13}{13/7}
\end{category}
\begin{category}{Quadratic1}
  \quest{x^2+x}{-1,0}
  \quest{x^2-9}{3,-3}
  \quest{x^2-7}{sqrt(7),-sqrt(7)}
  \quest{x^2+4x}{-4,0}
  \quest{x^2-x}{1,0}
  \quest{x^2+9}{empty}
  \quest{x^2}{0}
  \quest{x^2-4x}{4,0}
\end{category}
\begin{category}{Quadratic2}
  \quest{x^2+x+1}{empty}
  \quest{x^2-6x+9}{3}
  \quest{x^2-7x+6}{1,6}
  \quest{x^2+4x+4}{-2}
  \quest{x^2-3x+2}{1,2}
  \quest{x^2+2x+9}{empty}
  \quest{x^2-5x+6}{2,3}
  \quest{x^2+4x-21}{-7,3}
\end{category}
\begin{category}{Higher order}
  \quest{x^8-2}{2^(1/8),-2^(1/8)}
  \quest{x^3-2x}{0,sqrt(2),-sqrt(2)}
  \quest{x^4-1}{-1,1}
  \quest{x^3-8}{2}
  \quest{x^5-x^3}{1,-1,0}
  \quest{x^6-x^5}{1,0}
  \quest{x^3+2x^2+x}{0,-1}
  \quest{x^3+4x^2+5x}{0}
\end{category}

\newpage

\newpage
\textbf{\'Evariste Galois} (1811--1832) was a French mathematician
born in Bourg-la-Reine. He died in a duel at the age of twenty.

\medskip
\textbf{Niels Henrik Abel} (1802--1829), Norwegian mathematician, was
born in Nedstrand. In early April 1829 he obtained a position 
in Berlin, but the letter bringing the offer did not reach Norway
until two days after Abel's death from tuberculosis.

\medskip
Both mathematicians proved the impossibility of solving the $5$-degree
polynomial equation by radicals.

\newpage

\end{document}