We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ee4ee0 commit e0db3e6Copy full SHA for e0db3e6
_toc.yml
@@ -1,5 +1,8 @@
1
format: jb-book
2
parts:
3
+- caption: 'Centrale PC*'
4
+ chapters:
5
+ - url: https://raw.githubusercontent.com/cpge-itc/itc2/main/files/centrale.py
6
- caption: Révisions
7
chapters:
8
- td: "Résumé de cours"
files/centrale.py
@@ -0,0 +1,15 @@
+# Exercice 2
+import numpy.random as rd
+def X(k, n):
+ return [rd.randint(1, n + 1) for _ in range(k)]
+
+# Exercice 4
+import scipy.optimize as resol
9
+def x(n):
10
+ def f(x):
11
+ s = 0
12
+ for k in range(1, n + 1):
13
+ s += x**k/k
14
+ return s - 1
15
+ return resol.fsolve(f, 0.5)
0 commit comments