{"title":"Résolution algébrique (Secondaire 2)","description":"\u003ch1\u003eAlgèbre\u003c\/h1\u003e\n\u003ch1 id=\"demo12\"\u003ePour débuter tu dois cliquer sur ce bouton.\u003c\/h1\u003e\n\u003cp id=\"demo1\"\u003e\u003cimg alt=\"START\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0557\/0615\/7244\/files\/start5_480x480.png?v=1647292645\" onclick=\"creerEquation()\"\u003e\u003c\/p\u003e\n\u003ch3\u003eTrouve la valeur de x\u003c\/h3\u003e\n\u003cp id=\"demo3\"\u003e \u003c\/p\u003e\nx=\u003cinput value=\"\" type=\"text\" size=\"4\" maxlength=\"4\" id=\"myNumber\"\u003e\n\u003cp id=\"demo4\"\u003e \u003c\/p\u003e\n\u003cp id=\"demo2\"\u003e \u003c\/p\u003e\n\u003cp id=\"demo\"\u003e \u003c\/p\u003e\n\u003cp id=\"demo5\"\u003e \u003c\/p\u003e\n\u003ca href=\"https:\/\/fast123.ca\/pages\/maths\" data-mce-href=\"https:\/\/fast123.ca\/pages\/maths\"\u003eRetour à la section des projets de MATH\u003c\/a\u003e \u003cscript type=\"text\/javascript\"\u003e\n\n\nvar chaineGlobale=\"\";\nvar laReponse=\"\";\nvar nb=0;\nvar total=0;\n\n\n\nfunction getRandomInt(min, max) {\n  return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nfunction creerEquation2() {\ntotal +=1;\ndocument.getElementById(\"demo4\").innerHTML ='\u003cbutton id=\"boutonResolution\" onClick=\"resolution()\"\u003eVérification\u003c\/button\u003e'\ndocument.getElementById(\"demo5\").innerHTML ='';\ndocument.getElementById(\"demo2\").innerHTML ='';\ndocument.getElementById(\"myNumber\").value ='';\n\nvar reste= 1;\nvar tentative=0;\nwhile ( reste != 0 )\n{\n\nvar coefficient1 = getRandomInt(-10, 10);\nvar coefficient2 = getRandomInt(-10, 10);\nvar somme2 = getRandomInt(-40, 40)\nvar constant = getRandomInt(-10, 10)\n\nreste = ((somme2 - constant)%(coefficient1-coefficient2));\nif (constant == 0) {reste =1}\nif (somme2 == 0) {reste =1}\nif (coefficient1 == 1) {reste =1}\nif (coefficient1 == -1) {reste =1}\nif (coefficient2 == 1) {reste =1}\nif (coefficient2 == -1) {reste =1}\nif (coefficient1 == 0) {reste =1}\nif (coefficient2 == 0) {reste =1}\n\n\n\ntentative +=1;\n \n}\nvar signe = \" + \";\nif (constant \u003c 0 ) {\n       signe = \"\";\n       \n        var constantString = constant.toString();\n        constantString = constantString.replace(\"-\", \" - \");\n       }\nelse {var constantString=constant;}\n\nvar signe2 = \" + \";\nif (somme2 \u003c 0 ) {\n       signe2 = \"\";\n       \n        var constantString2 = somme2.toString();\n        constantString2 = constantString2.replace(\"-\", \" - \");\n       }\nelse {var constantString2=somme2;}\n\nvar reponse = ((somme2 - constant)\/(coefficient1-coefficient2));\nvar chaine = coefficient1 + \"x\" + signe  + constantString + \" = \" + coefficient2 + \"x\" +signe2 + constantString2;\n\/\/ chaine = chaine.replace(\"+\", \" + \");\n \/\/chaine = chaine.replace(\/-\/gi, \" - \");\n chaineGlobale = chaine ;\n \ndocument.getElementById(\"demo3\").innerHTML = chaine;\n\/\/document.getElementById(\"demo2\").innerHTML = reponse;\nlaReponse=reponse;\nreturn reponse;\n\n\n\n}\n\n \n \nfunction resolution() {\n  var reponse = document.getElementById(\"myNumber\").value;\n  if (isNaN(reponse)||reponse==\"\"){\n    document.getElementById(\"demo2\").innerHTML = 'Veuillez entrer un nombre...';\n    document.getElementById(\"demo\").innerHTML = '';\n    document.getElementById(\"myNumber\").innerHTML = '';\n  }\n  else{\n  if (laReponse==reponse){\n \n   nb+=1;\n  document.getElementById(\"demo2\").innerHTML = 'Bravo tu as la bonne réponse!!!';\n \n  }\n  else {\n   document.getElementById(\"demo2\").innerHTML = 'Mauvaise réponse! La bonne réponse était \u003cb\u003e' + laReponse + '\u003c\/b\u003e' ;\n  }\n   var num = nb\/total*100;\n  var pourcent = num.toFixed(2);\n  document.getElementById(\"demo\").innerHTML = 'Tu as ' + nb + ' sur ' + total + \" (\" + pourcent +'%)';\n \n document.getElementById(\"demo4\").innerHTML='';\n document.getElementById(\"demo5\").innerHTML ='Veux-tu continuer?\u003cbr\u003e\u003cbutton id=\"boutonContinue\" onClick=\"creerEquation2()\"\u003eOui (niveau avancé)\u003c\/button\u003e    \u003cbutton id=\"boutonFacile\" onClick=\"creerEquation()\"\u003eOui (niveau facile)\u003c\/button\u003e'\n \n\n\n\n \n \n}\n}\n\nfunction creerEquation() {\ntotal +=1;\ndocument.getElementById(\"demo4\").innerHTML ='\u003cbutton id=\"boutonResolution\" onClick=\"resolution()\"\u003eVérification\u003c\/button\u003e'\ndocument.getElementById(\"demo1\").innerHTML ='';  \n  document.getElementById(\"demo12\").innerHTML =''; \ndocument.getElementById(\"demo5\").innerHTML ='';\ndocument.getElementById(\"demo2\").innerHTML ='';\ndocument.getElementById(\"myNumber\").value ='';\nvar reste= 1;\nvar tentative=0;\nwhile ( reste != 0 )\n{\n\nvar coefficient = getRandomInt(-10, 10);\nvar somme = getRandomInt(-40, 40)\nvar constant = getRandomInt(-10, 10)\n\nreste = ((somme - constant)%coefficient);\nif (constant == 0) {reste =1}\nif (coefficient == 1) {reste =1}\nif (coefficient == -1) {reste =1}\n\ntentative +=1;\n \n}\nvar signe = \" + \";\nif (constant \u003c 0 ) {\n       signe = \"\";\n       \n        var constantString = constant.toString();\n        constantString = constantString.replace(\"-\", \" - \");\n       }\nelse {var constantString=constant;}\nvar reponse = ((somme - constant)\/coefficient);\nvar chaine = coefficient + \"x\" + signe  + constantString + \" = \" + somme;\n\n \nchaineGlobale = chaine ;\n \ndocument.getElementById(\"demo3\").innerHTML = chaine;\n\/\/document.getElementById(\"demo2\").innerHTML = reponse;\nlaReponse=reponse;\nreturn reponse;\n \n}\n\n\/\/ Get the input field\nvar input = document.getElementById(\"myNumber\");\n\n\/\/ Execute a function when the user releases a key on the keyboard\ninput.addEventListener(\"keyup\", function(event) {\n  \/\/ Number 13 is the \"Enter\" key on the keyboard\n  if (event.keyCode === 13) {\n    \/\/ Cancel the default action, if needed\n    event.preventDefault();\n    \/\/ Trigger the button element with a click\n    document.getElementById(\"boutonResolution\").click();\n  }\n});\n\u003c\/script\u003e","products":[],"url":"https:\/\/www.fast123.ca\/collections\/algebre.oembed","provider":"FastHoraire.ca RapidoVélo.com Fast123.ca","version":"1.0","type":"link"}