Thierry Dumont 6 bulan lalu
induk
melakukan
f433016f3e
4 mengubah file dengan 16 tambahan dan 0 penghapusan
  1. 6 0
      README.md
  2. 5 0
      fargs.py
  3. 2 0
      fdef.py
  4. 3 0
      fkw.py

+ 6 - 0
README.md

@@ -19,5 +19,11 @@
 
 * analysetext.py : manipulation simple de chainnes decaractères
 
+* fargs, fdef : plus sur les arguments des fonctions
+
+* dictionnaires
+
+* fkw : dictionnaires et fonctions
+
 * testturing.py : le théorème de Turing en quelques lignes.
 

+ 5 - 0
fargs.py

@@ -0,0 +1,5 @@
+def f(*args):
+    tot=0
+    for a in args:
+        tot += a
+    return tot

+ 2 - 0
fdef.py

@@ -0,0 +1,2 @@
+def fdef(a,b=0):
+    return a+b

+ 3 - 0
fkw.py

@@ -0,0 +1,3 @@
+def fkw(**kw):
+    for k in kw:
+        print(k,kw[k])