@ -22,43 +22,53 @@
integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/"
crossorigin="anonymous">< / script >
< / head >
< body style = "background-color: black ;background-image: none;">
< body style = "background-color: #050e15 ;background-image: none;">
< div class = "container-fluid" >
< div class = "row" >
< div class = "col-3" >
< div class = "retour" >
< a class = "material-icons" id = "home" href = "../Home.html" style = "font-size:36px;color:white;" > home< / a >
< 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 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 >
< 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" >
< 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 ">
< div class = "col-4 py-3 ">
< div class = 'compiler_class' >
< textarea id = 'console' readonly cols = "100" rows = "30" > < / textarea >
< / div >