Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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'introduction ===== ===== Exercice d'introduction =====
  
 +<code python>
 +
 +def k(i):
 +    # rxkfghh = rxkfgh2 sauf si i = 1
 +    rxkfghh="gh"
 +    if i==1:
 +        p=7
 +        a=p+2
 +        rxkfgh=1
 +        rxkfghh="temporaire"
 +        print(rxkfghh, rxkfgh)
 +    else:
 +        rxkfghh2="tempoaussi"
 +        rxkfgh = i*k(i-1)
 +        print(rxkfghh, rxkfgh)
 +    return rxkfgh
 +
 +</code>
 ===== Support de cours ===== ===== Support de cours =====