<!--
// Not Found
// The requested URL /questions.js was not found on this server.
// Apache/2.2.6 Server at math.harvard.edu Port 80




















































































































































































// end of file




























































































// you found the source ... you seem to go to the "bottom" of things.
// quizz javascript engine by oliver knill, 1999-2003

function random_switch() { 
var tmp;
u[i]="a"; v[i]="b";
  if (Math.random()<0.5) {
      u[i]="b"; v[i]="a";
      tmp=b[i]; b[i]=a[i]; a[i]=tmp;
      if (w[i]=="a") { w[i]=="b"; } else { w[i]=="a"; }
  }
}

function load_questions(){
  q = new Array();
  a = new Array();
  b = new Array();
  u = new Array();
  v = new Array();
  w = new Array();
  i = 0; 

  q[i]="<img src=\"2009/pi.png\" alt=\"pi\"> is known to be a normal number in the base 10.";
  a[i]="True";
  b[i]="False";
  w[i]="b";
  random_switch(); 
  i++; 

  q[i]="exp(i <img src=\"2009/pi.png\" alt=\"pi\">) is known to be rational";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;


  q[i]="Gelfond's constant exp(<img src=\"2009/pi.png\" alt=\"pi\">) is known to be transcendental";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;

  q[i]="(<img src=\"2009/pi.png\" alt=\"pi\">^(<img src=\"2009/pi.png\" alt=\"pi\">) is known to be transcendental.";
  a[i]="True";
  b[i]="False";
  w[i]="b";
  random_switch();
  i++;

  q[i]="It is known whether <img src=\"2009/pi.png\" alt=\"pi\"> + e is irrational";
  a[i]="True";
  b[i]="False";
  w[i]="b";
  random_switch();
  i++;

  q[i]="Either  <img src=\"2009/pi.png\" alt=\"pi\"> + e   or  <img src=\"2009/pi.png\" alt=\"pi\"> - e  is irrational";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;

  q[i]="<img src=\"2009/pi.png\" alt=\"pi\"> is known to be Diophantine: there are C>0,r>1 so that | <img src=\"2009/pi.png\" alt=\"pi\">-p/q| > C/q<sup>r</sup> for all integers p,q>0",
  a[i]="True";
  b[i]="False";
  w[i]="b";
  random_switch();
  i++;


  q[i]="1/<img src=\"2009/pi.png\" alt=\"pi\"> is known to be irrational";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;

  q[i]="The square root of  <img src=\"2009/pi.png\" alt=\"pi\"> is known to be irrational";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;

  q[i]="The world record of reciting digits of pi by heart is 67890";
  a[i]="True";
  b[i]="False";
  w[i]="a";
  random_switch();
  i++;



  number_questions=i;
}

function write_questions() {
text="<table class=\"quizz\">";
for (i=0; i<number_questions;i++) {
  j=i+1;
  text = text+"<tr>"
 +"<td>"+j+")"+"</td>"
 +"<td>"+q[i]+"</td>"
 +"<td><input type=radio name=question"+i+" value=A class=\"button\"><br>"+a[i]+"</td>"
 +"<td><input type=radio name=question"+i+" value=B class=\"button\"><br>"+b[i]+"</td>"
 +"<td><img src=2009/white.png width=20 height=20 name=question"+i+"_pic>"
 +"</td></tr>";
}
text=text+"</table>";
document.write(text); 
}

function change(name,place) { if (document.images != null) { document.quizz [place].src = name; } }
function put_pic(j,name) { k=j; place="question"+k+"_pic"; change("2009/"+name+".png",place); }
function check(j,k) { return("document.quizz.question"+j+"["+k+"].checked"); }

function score() {
var sum     =0;
var n       = new Array();
var comment = new Array(); 
  comment[ 0]="Did you try at all?"; 
  comment[ 1]="Not much luck."; 
  comment[ 2]="Eat more pie!"; 
  comment[ 3]="Random Guess?"; 
  comment[ 4]="Much to improve."; 
  comment[ 5]="Average. Try again."; 
  comment[ 6]="Could be better."; 
  comment[ 7]="Not bad."; 
  comment[ 8]="Good score!"; 
  comment[ 9]="Fantastic!"; 
  comment[10]="You are an expert!"; 

  for (j=0; j<number_questions; j++) {
    n[j]="o"; k=j+1;
    if (eval(check(j,0))=="1") n[j]=u[j];
    if (eval(check(j,1))=="1") n[j]=v[j]; 
    if (w[j] == n[j]) { sum++;  put_pic(j,"green"); } else { put_pic(j,"red"); }
  }
  document.quizz.result1.value=sum;
  document.quizz.result2.value=number_questions;
  document.quizz.result3.value=comment[Math.floor(10*sum/number_questions)]; 
}

//-->

