We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

allan9395 • 1 year ago

Bonsoir
Y a t'il des corriger disponible

Cordialement

Anonymous • 7 months ago

is there any correction here ????

Mohamed Mekkaoui • 2 years ago

Maroc => Barbes
Portugal => Porto
o_O

Jergal • 2 years ago

Some racist and homophobic content in french version.
Capital of Maroc : Barbes
Ex 25, in the user list : disizcestpasdurapdepd @ gmail . com

[CG]Thibaud • 2 years ago

Indeed. I've created a pull request to the author.

JaimeSastre • 2 years ago

Hello I finished the test, was funny. Something to do after?
Thanks

Sarah_OA • 1 week ago

exercice 25 : 404 not found
y'a aucune explication!!!!

Sarah_OA • 1 week ago

exercice 20:

function listHTML($str,Array $T)
{
$res = "<h3>$str</h3><ul>";
for($i=0;$i<count($t);$i++) {="" $res="$res."&lt;li">$T[$i]</li>";
}

if(empty($T) || empty($str))
{
return null;
}
return $res."</ul>";
}
_____________________
exercice 21:

function quelleAnnee()
{
$mydate=getdate(date("U"));
return "$mydate[year]";
}

______________________
exercice 22:

function quelleAnnee()
{
$mydate=getdate(date("U"));
return "$mydate[year]";
}
_______________________
exercice 23:

function quelleDate()
{
return date("d/m/Y");
}
_______________________
exercice 24:

function fonctionMagique()
{
include "./libraryToInclude.php";
return fonctionDeMaLibrairie();
}

exercice 21:

function remplacerLesLettres($str)
{
$lettre = ["e","i","o"];
$remplacer = [3,1,0];
return str_ireplace($lettre,$remplacer,$str);
}

Sarah_OA • 1 week ago

exercice 11:

function plusPetit($a,$b,$c)
{
if($a<$b)
{
if($a>$c)
{
return $c;
}
else{
return $a;
}
}else{
if($b<$c)
{
return $b;
}else
{
return $c;
}
}

}
____________________________
exercice 12:

function premierElementTableau(array $T)
{
if(empty($T))
{
return null;
}
return $T[0];
}
__________________________
exercice 13:

function premierElementTableau(array $T)
{
if(empty($T))
{
return null;
}
return $T[0];
}
__________________________
exercice 14:

function dernierElementTableau(Array $Tab)
{
if(empty($Tab))
{
return null;
}
return end($Tab);
}

________________________
exercice 15:

function plusGrand(Array $T)
{
if(empty($T))
{
return null;
}
for($i=0;$i<count($t);$i++) {="" if($t[$i]="">$T[$i+1])
{
return $T[$i];
}
}
}
_____________________
exercice 16:

function plusPetit(Array $T)
{
if(empty($T))
{
return null;
}
return min($T);
}
________________________
exercice 17:

function verificationPassword($val)
{
$val2 = strlen($val);
if($val2>=8)
{
return true;
}
else{
return false;
}
}
_________________________
exercice 18:

function verificationPassword($val)
{
$pattern1 = "#[0-9].*#";
$pattern2 = "#[A-Z].*#";
$pattern3 = "#[a-z].*#";
$val2 = strlen($val);
if(($val2>=8) && (preg_match($pattern1, $val)) && (preg_match($pattern2, $val)) && (preg_match($pattern3, $val)))
{
return true;
}

return false;

}
_____________________
exercice 19:

function capital($str)
{
Switch($str)
{
case 'France' :
return 'Paris';
break;
case 'Allemagne' :
return 'Berlin';
break;
case 'Italie':
return 'Rome';
break;
case 'Maroc' :
return 'Rabat';
break;
case 'Espagne':
return 'Madrid';
break;
case 'Portugal':
return 'Lisbonne';
break;
case 'Angleterre':
return 'Londres';
break;
default:
return 'Inconnu';
}
}

Sarah_OA • 1 week ago

exercice 6:
function somme($val1,$val2)
{
return $val1+$val2;
}
________________________
exercice 7:
function soustraction ($val1,$val2)
{
return $val1-$val2;
}
________________________
exercice 8:
function multiplication($a,$b)
{
return $a*$b;
}
_________________________
exercice 9:
function estIlMajeure($val)
{
if($val>=18)
{
return true;
}else
{
return false;
}
}
_________________________
exercice 10:
function plusGrand($a,$b)
{
if($a>$b)
{
return $a;
}
else
{
return $b;
}
}

Sarah_OA • 1 week ago

exercice 1:

function helloWorld()
{
return "Hello World!";
}

___________________
exercice 2:

function quiEstLeMeilleurProf()
{
return "Le prof de programmation Web";
}
____________________
exercice 3:

function jeRetourneMonArgument($val)
{
return $val;
}
_____________________
exercice 4:

function concatenation($val1,$val2)
{
$val0= $val1.$val2;
return $val0;
}
______________________
exercice 5:

function concatenationAvecEspace($val1,$val2)
{
return $val1.' '.$val2;
}

Agor White • 1 week ago

ps:

Il y a un bug a corriger, parce que si tu fais un simple code qui affiche dans la function nameDemander(){ echo true;} tout les testes son success mdr
celine • 1 month ago

Bonjour , comment peux t on avoir le corriger? merci d'avance

Anonymous • 1 month ago

comment peux on avoir la correction?

Anonymous • 1 year ago

exercice 21 : ma solution fonctionne mais codinggame la refuse

function remplacerLesLettres($chaine){
return strtr($chaine, 'eio', '310');
}

Mohamed_Maallem • 1 year ago

function remplacerLesLettres()
{
$input = "Les cours de programmation Web sont trops cools";
if (!empty($input)) {
echo str_replace(["L", "m", "d"], ["0", "2", "9"], $input);
}
}
echo remplacerLesLettres();

coralsnake • 4 months ago

l'énoncer dit la variable est en argument et doit être retourné modifié et non afficher par "echo" , le site est bugé

Anonymous • 1 month ago

En fait il faut inclure les majuscules, dans ce cas :

return strtr($a, 'eioEIO', '310310');