|
|
<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8" />
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
<title>Bootstrap Site</title>
|
|
|
<link
|
|
|
rel="stylesheet"
|
|
|
href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css"
|
|
|
integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I"
|
|
|
crossorigin="anonymous"/>
|
|
|
<link rel="stylesheet" href="../../CSS/Enigmev2.css"/>
|
|
|
<link rel="stylesheet" href="../../CSS/Main.css">
|
|
|
|
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
|
|
<script
|
|
|
src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
|
|
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
|
|
crossorigin="anonymous"></script>
|
|
|
<script
|
|
|
src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js"
|
|
|
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
|
|
|
crossorigin="anonymous"></script>
|
|
|
</head>
|
|
|
<body style="background-color: #050e15;background-image: none;">
|
|
|
<div class="container-fluid">
|
|
|
<div class="row">
|
|
|
<div class="col-3" style="height: auto; min-height: 100vh;">
|
|
|
<div class="row">
|
|
|
<div class="col-2 text-center pt-3">
|
|
|
<a id="home" href="../Home.html" >
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" style="color: white;" width="32" height="32" fill="currentColor" class="bi bi-house-fill" viewBox="0 0 16 16">
|
|
|
<path d="M8.707 1.5a1 1 0 0 0-1.414 0L.646 8.146a.5.5 0 0 0 .708.708L8 2.207l6.646 6.647a.5.5 0 0 0 .708-.708L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.707 1.5Z"/>
|
|
|
<path d="m8 3.293 6 6V13.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5V9.293l6-6Z"/>
|
|
|
</svg>
|
|
|
</a>
|
|
|
</div>
|
|
|
<div class="col-10 pt-1">
|
|
|
<h1 class="display-5" style="letter-spacing: 0.1rem;""> <!--Mettre responsive si moins de 1500px-->
|
|
|
Palindrome
|
|
|
</h1><br>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<section class="row mt-3 ">
|
|
|
<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>
|
|
|
</section>
|
|
|
<section class="row mt-3">
|
|
|
<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>
|
|
|
</section>
|
|
|
<section class="row mt-3">
|
|
|
<h2>Exemple</h2><br>
|
|
|
<p>Entrée :      Sortie :</p>
|
|
|
<p>[1,0,1]        True</p>
|
|
|
<p>[1,1,9,1]       False</p><br><br>
|
|
|
</section>
|
|
|
<section class="row mt-3">
|
|
|
<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>
|
|
|
</section>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-5 h-auto py-3">
|
|
|
<div class='ace' id='editor'>def estPalindrome(var):
|
|
|
return var == var[::-1]
|
|
|
print(estPalindrome("abba"))
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-4 py-3">
|
|
|
<div class='compiler_class'>
|
|
|
<textarea id='console' readonly cols="100" rows="30"></textarea>
|
|
|
</div>
|
|
|
<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>
|
|
|
</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/palindrome.js"></script>
|
|
|
</body>
|
|
|
</html> |