This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
from decimal import * | |
def fib(n): | |
return fib_iter(1,0,0,1,Decimal(n)) | |
def fib_iter(a,b,p,q,n): | |
nb_iter = 0 | |
while n != 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = ['AB' => 12, 'CB' => 34]; | |
echo "Cas nominal : La clé est présente dans le tableau".PHP_EOL; | |
echo (int)array_key_exists('AB', $a).PHP_EOL; | |
echo (int)isset($a['AB']).PHP_EOL; | |
echo (int)!empty($a['AB']).PHP_EOL; | |
echo "Cas nominal : La clé n'est pas présente dans le tableau".PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert("plop"); |