Update app.py
Browse files
app.py
CHANGED
@@ -6,38 +6,11 @@ def generate_data(subject, input_field, difficulty):
|
|
6 |
print("Input:", input_field)
|
7 |
print("Difficulté:", difficulty)
|
8 |
|
9 |
-
q = """
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
Le travail de la force de frottement est :
|
15 |
-
$$W_f=-\mu_c Nl\cos\alpha$$
|
16 |
-
Le théorème de l'énergie cinétique nous donne :
|
17 |
-
$$E_{p_1}+W_f=E_{c_2}$$
|
18 |
-
D'où :
|
19 |
-
$$\begin{split}mgl(h_1+L\sin\alpha)-\mu_c Nl\cos\alpha &= \frac{1}{2}mv^2 \\\ \iff v &= \sqrt{2gl(h_1+L\sin\alpha)-2\mu_c Nl\cos\alpha} \end{split}$$
|
20 |
-
Avec \(N=mg\cos\alpha\), on obtient :
|
21 |
-
$$\begin{split}v &= \sqrt{2gl(h_1+L\sin\alpha)-2\mu_c mgl\cos^2\alpha} \\\ &= \sqrt{2gL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right)} \end{split}$$
|
22 |
-
b)
|
23 |
-
Lorsque le cube est au point \(B_2\), son énergie mécanique est :
|
24 |
-
$$\begin{split}E_2 &= E_{c_2}+E_{p_2} \\\ &= \frac{1}{2}mv^2 \\\ &= mgL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right) \end{split}$$
|
25 |
-
c)
|
26 |
-
Lorsque le cube s'arrête, son énergie cinétique est nulle.
|
27 |
-
Son énergie potentielle est :
|
28 |
-
$$E_{p_3}=mgl(h_2+L\sin\alpha)$$
|
29 |
-
Le théorème de l'énergie cinétique nous donne :
|
30 |
-
$$E_2=E_{p_3}$$
|
31 |
-
D'où :
|
32 |
-
$$\begin{split}mgL\left(h_1+L\sin\alpha- \mu_c l\cos^2\alpha\right) &= mgL(h_2+L\sin\alpha) \\\ \iff h_2 &= h_1-\mu_c l\cos^2\alpha \end{split}$$
|
33 |
-
d)
|
34 |
-
Lorsque le cube revient en \(B_1\), son énergie cinétique est nulle.
|
35 |
-
Son énergie potentielle est :
|
36 |
-
$$E_{p_4}=mgl(h_1+L\sin\alpha)$$
|
37 |
-
Le théorème de l'énergie cinétique nous donne :
|
38 |
-
$$E_3=E_{p_4}$$
|
39 |
-
D'où :
|
40 |
-
$$\begin{split}E_3 &= mgL\left(h_2+L\sin\alpha- \mu_c l\cos^2\alpha\right) \\\ &= mgL\left(h_1+L\sin\alpha-\mu_c l\cos^2\alpha-\mu_c l\cos^2\alpha\right) \\\ &= mgL\left(h_1+L\sin\alpha-2\mu_c l\cos^2\alpha\right) \end{split}$$ """
|
41 |
|
42 |
|
43 |
return q
|
|
|
6 |
print("Input:", input_field)
|
7 |
print("Difficulté:", difficulty)
|
8 |
|
9 |
+
q = """
|
10 |
+
|
11 |
+
Tu es expert dans la génération d'exercice. Je veux que tu le génère un exercice de {subject}. L'exercice sera centré sur {input_field}. Avec une difficulté de niveau {difficulty}. Je veux un exercice attendu en Latex, dans un format acceptable par Mathjax. Commence ta phrase par "Exercice 1"
|
12 |
+
|
13 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
|
16 |
return q
|