ue_paysadj.htm

Bild: ue_paysadj.htm

text/html ue_paysadj.htm — 10 KB

Dateiinhalt

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta name="title" content="Les habitants de l'Union europenne - Quelle est leur nationalit ?">
<meta name="keywords" content="Union europenne, pays, prposition, nationalit, adjectif, Europische Union, Lndernamen, Adjektiv, Einwohner, Prposition, Unterricht Franzsisch Grammatik enseignement Franais FLE grammairefranzsische Grammatik">
<meta name="description" content="Interaktive Grammatikbung: Einwohner Europas und adjectifs de nationalit">

<script language="javascript">
  function clickage(val) {
  document.forms[0].ans_nation.value+=val;
  }
</script>
<script language="JavaScript">
<!--
function makeArray() {
  this.length = makeArray.arguments.length
  for (var i = 0; i < this.length; i++)
  this[i+1] = makeArray.arguments[i]
}
var pays = new makeArray(27);
pays[0]="Finlande";
pays[1]="Allemagne";
pays[2]="Angleterre";
pays[3]="Estonie";
pays[4]="Autriche";
pays[5]="Belgique";
pays[6]="Hongrie";
pays[7]="Sude";
pays[8]="Espagne";
pays[9]="France";
pays[10]="Irlande";
pays[11]="Pologne";
pays[12]="Lettonie";
pays[13]="Italie";
pays[14]="Lituanie";
pays[15]="Slovaquie";
pays[16]="Rpublique Tchque";
pays[17]="Grce";
pays[18]="Slovnie";
pays[19]="Roumanie";
pays[20]="Bulgarie";
pays[21]="Danemark";
pays[22]="Luxembourg";
pays[23]="Portugal";
pays[24]="Pays-Bas";
pays[25]="Malte";
pays[26]="Chypre";

var nation = new makeArray(27);
nation[0]="Finlandais";
nation[1]="Allemand";
nation[2]="Anglais";
nation[3]="Estonien";
nation[4]="Autrichien";
nation[5]="Belge";
nation[6]="Hongrois";
nation[7]="Sudois";
nation[8]="Espagnol";
nation[9]="Franais";
nation[10]="Irlandais";
nation[11]="Polonais";
nation[12]="Letton";
nation[13]="Italien";
nation[14]="Lituanien";
nation[15]="Slovaque";
nation[16]="Tchque";
nation[17]="Grec";
nation[18]="Slovne";
nation[19]="Roumain";
nation[20]="Bulgare";
nation[21]="Danois";
nation[22]="Luxembourgeois";
nation[23]="Portugais";
nation[24]="Nerlandais";
nation[25]="Maltais";
nation[26]="Chypriote";

var suj = new makeArray(4);
suj[0]="Il est";
suj[1]="Elle est";
suj[2]="Ils sont";
suj[3]="Elles sont";

var habiter = new makeArray(4);
habiter[0]="Il habite";
habiter[1]="Elle habite";
habiter[2]="Ils habitent";
habiter[3]="Elles habitent";

function clear(){
  document.forms[0].ans_nation.value="";
  document.forms[0].ans_prep.value="";
  document.forms[0].pays.value="";
  document.forms[0].suj.value="";
  document.forms[0].habiter.value="";
  document.forms[0].tally_1.value=0;
  document.forms[0].tally_2.value=0;
}

function fStart(){
  questionControl="";
  score=0;
  count=0;
  document.forms[0].tally_1.value=score;
  document.forms[0].tally_2.value=count;
  getQuestion();
}

function findEnd(word,end){
  var v_f=false;
  if(parseInt(word.indexOf(end))!=-1){
  v_f=true;
  }
  return v_f;
}

function getQuestion(){
  var now = new Date();
  sec = now.getSeconds();
  random=sec%29;
  random_suj=sec%4;
  countControl=20;
  attempt=0;
  if(count==countControl){
    if(confirm("\rVotre rsultat dans ce round est "+score+" sur "+count+".\rVoulez-vous faire un autre round ?")==true){
      fStart();
    }
    else{
      clear();
    }
  }
  else{
    getQuestion2();
  }
}

function getQuestion2(){
  document.forms[0].ans_nation.value="";
  document.forms[0].ans_prep.value="";
  document.forms[0].pays.value=pays[random];
  document.forms[0].suj.value=suj[random_suj];
  document.forms[0].habiter.value=habiter[random_suj];

  if(findEnd(questionControl,document.forms[0].pays.value)==true){
    random=(random+1) % 27;
    getQuestion2();
  }
  else{
    questionControl+=document.forms[0].pays.value;
    document.forms[0].ans_prep.focus();
  }
}

function detGenre(){
  var genre=null;
  if(findEnd(nation[random],"en")==true || findEnd(nation[random],"on")==true){
    masc=nation[random];
    fem=nation[random]+"ne";
    masc_plu=nation[random]+"s";
    fem_plu=fem+"s";
  }
  else if(findEnd(nation[random],"ais")==true) {
    masc=nation[random];
    fem=nation[random]+"e";
    masc_plu=nation[random];
    fem_plu=fem+"s";
  }
    else if(findEnd(nation[random],"ois")==true) {
    masc=nation[random];
    fem=nation[random]+"e";
    masc_plu=nation[random];
    fem_plu=fem+"s";
  }
  else if(findEnd(nation[random],"Allemand")==true || findEnd(nation[random],"Espagnol")==true || findEnd(nation[random],"Roumain")==true){
    masc=nation[random];
    fem=nation[random]+"e";
    masc_plu=nation[random]+"s";
    fem_plu=fem+"s";
  }
  else if(findEnd(nation[random],"ec")==true) {
    masc=nation[random];
    fem=nation[random]+"que";
    masc_plu=nation[random]+"s";
    fem_plu=fem+"s";
  }
  else if(findEnd(nation[random],"Belge")==true || findEnd(nation[random],"Tchque")==true ||
findEnd(nation[random],"Slovaque")==true || findEnd(nation[random],"Slovne")==true || findEnd(nation[random],"Bulgare")==true || findEnd(nation[random],"Chypriote")==true){
    masc=nation[random];
    fem=nation[random];
    masc_plu=nation[random]+"s";
    fem_plu=fem+"s";
  }
  if(random_suj==0)genre=masc;
  else if(random_suj==1)genre=fem;
  else if(random_suj==2)genre=masc_plu;
  else if(random_suj==3)genre=fem_plu;
  return genre;
}

function detPrep(){
  var prep=null;
  if(random<21)prep="en";
  if(random>20 && random<24)prep="au";
  if(random==24)prep="aux";
  if(random==25)prep="";
  if(random==26)prep="";
  return prep;
}

function checkAns(){
  if(document.forms[0].ans_prep.value == ""){
    alert("Vous n'avez pas rempli toutes les cases.");
    document.forms[0].ans_prep.focus();
  }
  else if(document.forms[0].ans_nation.value==""){
    alert("Vous n'avez pas rempli toutes les cases.");
    document.forms[0].ans_nation.focus();
  }
  else if(document.forms[0].ans_nation.value==detGenre() && document.forms[0].ans_prep.value == detPrep()){
    score+=1;
    document.forms[0].tally_1.value=score;
    count+=1;
    document.forms[0].tally_2.value=count;
    getQuestion();
  }
  else if(document.forms[0].ans_nation.value==detGenre() && document.forms[0].ans_prep.value != detPrep() && attempt<1){
    alert("Une des rponses n'est pas correcte.");
    attempt+=1;
    document.forms[0].ans_prep.focus();
    document.forms[0].ans_prep.select();
  }
  else if(document.forms[0].ans_nation.value!=detGenre() && document.forms[0].ans_prep.value == detPrep() && attempt<1){
    alert("Une des rponses n'est pas correcte.");
    attempt+=1;
    document.forms[0].ans_nation.focus();
    document.forms[0].ans_nation.select();
  }
  else if(attempt<1){
    attempt+=1;
    alert("Malheureusement non. Essayez de nouveau.");
    document.forms[0].ans_prep.focus();
  }
  else{
    alert("\rDsol. La rponse est...\r\r"+habiter[random_suj]+" "+detPrep()+" " +pays[random]+"\r"+suj[random_suj]+" "+detGenre());
    count+=1;
    document.forms[0].tally_2.value=count;
    getQuestion();
  }
}
//-->
</script>
</head>


<body bgcolor="#CAE0EF" topmargin="0" leftmargin="1">

<blockquote><blockquote><font face="verdana, arial, helvetica"><font color="#993366"><font size=+1></font></font></font>&nbsp;
<br><h1><font color="#993366">Les habitants de l'Union europenne - Quelle est leur nationalit ?</font></h1></blockquote></blockquote>

<ul>
<li>
<font face="verdana,arial,helvetica"><font color="#993366"><font size=-1>Cliquez
sur "<i>Dmarrer</i>" pour commencer.</font></font></font></li>

<li>
<font face="verdana,arial,helvetica"><font color="#993366"><font size=-1>Ajoutez
la prposition (<i>en, , au, aux</i>) dans la premire
phrase et l'adjectif de nationalit dans la seconde phrase. Exemple:</font></font></font></li>

<i><font face="verdana,arial,helvetica"><font size=-1><font color="#008000">&nbsp;
- </font><font color="#CC0000">Il habite</font><font color="#008000"> <b>en</b></font><font color="#CC0000">
France.</font></font></font></i>
<br><i><font face="verdana,arial,helvetica"><font size=-1><font color="#008000">&nbsp;
- </font><font color="#CC0000">Il est</font><font color="#008000"> <b>Franais</b>.</font></font></font></i>
<li>
<font face="verdana,arial,helvetica"><font color="#993366"><font size=-1>Cliquez
sur "<i>OK</i>" pour voir si votre rponse tait correcte.
Si votre rponse n'est pas correcte, le programme vous le dira.
Sinon, il continue  vous poser des questions (20).</font></font></font></li>
<li><font face="verdana,arial,helvetica"><font color="#993366"><font size="-1">Informez-vous d'abord sur <a href="europays.html">les noms de pays</a> et sur <a href="ue_paysadjflash.htm">leurs habitants et les adjectifs de nationalit</a>.</font></font></font><font face="verdana,arial,helvetica"><font color="#993366"><font size="-1"><br>
Et quelles <a href="paysprep.html">prpositions</a> faut-il ?</font></font></font><br></li>
</ul>

<center><form onsubmit="return false"></center>

<center><table border=0 cellspacing=0 width="620" >
<tr>
<td valign=top width="180">&nbsp;</td>

<td align=center valign=top width="160"><input type=button value=" Dmarrer " onclick="fStart()"></td>

<td valign=top width="180"><font face="arial,helvetica"><font color="#008000"><font size=-1>Score:&nbsp;<input type=text name="tally_1" size="2" readonly></font></font></font>/&nbsp;<input type=text name="tally_2" size="2" readonly></td>
</tr>

<tr>
<td align=right valign=top width="180"><input type=text name="habiter" size="15" readonly>
<p><input type=text name="suj" size="15" readonly></td>

<td align=center valign=top width="160"><input type=text name="ans_prep" size="15">
<p><input type=text name="ans_nation" size="16"><b><font face="times"><font size=+0>.</font></font></b></td>

<td align=left valign=top width="180"><input type=text name="pays" size="20" readonly><b><font face="times"><font size=+0>.</font></font></b>
<p><input type=button value=" OK " onclick="checkAns()"></td>
</tr>

<tr>
<td></td>

<td>
<center><input type="button" name="" value="" onclick=clickage("") width="25">
<br><font face="verdana,arial,helvetica"><font color="#993366"><font size=-1>Cliquez
ici</font></font></font>
<br><font face="verdana,arial,helvetica"><font color="#993366"><font size=-1>pour
ajouter ""</font></font></font></center>
</td>

<td></td>
</tr>
</table></center>
<center></form></center>

</body>
</html>