|
|
|
@ -1 +1,80 @@
|
|
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
<title>Palindrome</title>
|
|
|
|
|
<link rel="stylesheet" href="../../CSS/Enigme.css"/>
|
|
|
|
|
<link rel="stylesheet" href="../../CSS/Home.css">
|
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="enigme">
|
|
|
|
|
<div class="titre_pre">
|
|
|
|
|
<div class="retour">
|
|
|
|
|
<a class="material-icons" id="home" href="../Home.html" style="font-size:36px;color:white;">home</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sign">
|
|
|
|
|
<h1>
|
|
|
|
|
<span class="fast-flicker">p</span>
|
|
|
|
|
<span>alin</span>
|
|
|
|
|
<span class="flicker">d</span>
|
|
|
|
|
<span>rome</span>
|
|
|
|
|
</h1>
|
|
|
|
|
</div><br>
|
|
|
|
|
</div>
|
|
|
|
|
<h2>Consigne</h2><br>
|
|
|
|
|
<p class="enonce">
|
|
|
|
|
Écrire une fonction estPalindrome qui prend en argument un entier et qui renvoie True si c’est un palindrome et False sinon.
|
|
|
|
|
</p><br><br>
|
|
|
|
|
<h2>Rappel</h2><br>
|
|
|
|
|
<p class="rappel">Un palindrome est un nombre qui peut se lire dans les deux sens. Par exemple 111.</p><br><br>
|
|
|
|
|
<h2>Exemple</h2><br>
|
|
|
|
|
<p>Entrée :      Sortie :</p>
|
|
|
|
|
<p>[1,0,1]        True</p>
|
|
|
|
|
<p>[1,1,9,1]       False</p><br><br>
|
|
|
|
|
<h2>Aide</h2><br>
|
|
|
|
|
<p>En python l’instruction [::-1] permet d’inverse une chaine de caractère. Par exemple print("ae"[::-1]) affiche : ea.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class='ace' id='editor'>def estPalindrome(var):</div>
|
|
|
|
|
<div class='compiler_class'>
|
|
|
|
|
<textarea id='console' readonly rows="30" cols="100"></textarea>
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<div>
|
|
|
|
|
<a onclick="run_init()" class="btn">
|
|
|
|
|
<span class="noAnimation">Run</span>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="#m1-o" onclick="submit()" class="btn">
|
|
|
|
|
<span class="noAnimation">Submit</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="modal-container" id="m1-o" style="--m-background: transparent;">
|
|
|
|
|
<div class="modal">
|
|
|
|
|
<div id="containerResult">
|
|
|
|
|
<h1 id="result"></h1>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<div id="top">
|
|
|
|
|
<a href="#" class="btn">
|
|
|
|
|
<span class="noAnimation">x</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="bottom">
|
|
|
|
|
<a href="./ChuckNorris.html" class="btn" id="fleche">
|
|
|
|
|
<span class="noAnimation">Next</span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script src="https://ajaxorg.github.io/ace-builds/src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="https://raw.githack.com/pythonpad/brython-runner/master/lib/brython-runner.bundle.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="../../JS/base.js"></script>
|
|
|
|
|
<script src="../../JS/chuckNorris.js"></script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|