Différences
Ci-dessous, les différences entre deux révisions de la page.
ens:cvda:bonnespratiques [2016/11/28 08:45] admin Cordier Amelie () créée |
ens:cvda:bonnespratiques [2016/11/28 08:45] (Version actuelle) admin Cordier Amelie () [Exercice d'introduction] |
||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
===== Exercice d' | ===== Exercice d' | ||
+ | <code python> | ||
+ | |||
+ | def k(i): | ||
+ | # rxkfghh = rxkfgh2 sauf si i = 1 | ||
+ | rxkfghh=" | ||
+ | if i==1: | ||
+ | p=7 | ||
+ | a=p+2 | ||
+ | rxkfgh=1 | ||
+ | rxkfghh=" | ||
+ | print(rxkfghh, | ||
+ | else: | ||
+ | rxkfghh2=" | ||
+ | rxkfgh = i*k(i-1) | ||
+ | print(rxkfghh, | ||
+ | return rxkfgh | ||
+ | |||
+ | </ | ||
===== Support de cours ===== | ===== Support de cours ===== | ||