Feat: clean output
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bertrand Benjamin 2022-02-28 08:57:42 +01:00
parent f9c7263c59
commit afada4821f
7 changed files with 39 additions and 172 deletions

View File

@ -29,19 +29,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"id": "6c462cdd", "id": "6c462cdd",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello les 2nd\n",
"4\n"
]
}
],
"source": [ "source": [
"print(\"Hello les 2nd\")\n", "print(\"Hello les 2nd\")\n",
"a = 2\n", "a = 2\n",
@ -155,35 +146,7 @@
"execution_count": null, "execution_count": null,
"id": "8c4cabd7", "id": "8c4cabd7",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Tu arrives dans un long couloir et tu avances. Jusqu'à ce que...\n",
"Il y a 3 portes devant toi.\n",
"Laquelle ouvres-tu?3\n",
"Rien! Tu as survécu à une porte en plus.\n",
"Tu arrives dans un long couloir et tu avances. Jusqu'à ce que...\n",
"Il y a 3 portes devant toi.\n",
"Laquelle ouvres-tu?3\n",
"Une momie attaque!\n",
"Elle te touche une fois\n",
"Elle te touche une fois\n",
"Elle te touche une fois\n",
"Tu arrives dans un long couloir et tu avances. Jusqu'à ce que...\n",
"Il y a 3 portes devant toi.\n",
"Laquelle ouvres-tu?3\n",
"Rien! Tu as survécu à une porte en plus.\n",
"Tu arrives dans un long couloir et tu avances. Jusqu'à ce que...\n",
"Il y a 3 portes devant toi.\n",
"Laquelle ouvres-tu?3\n",
"Rien! Tu as survécu à une porte en plus.\n",
"Tu arrives dans un long couloir et tu avances. Jusqu'à ce que...\n",
"Il y a 3 portes devant toi.\n"
]
}
],
"source": [ "source": [
"# Programme de la momie - tiré du livre les maths ensembles et pour chacun\n", "# Programme de la momie - tiré du livre les maths ensembles et pour chacun\n",
"from random import randint\n", "from random import randint\n",

View File

@ -20,21 +20,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "d366babc", "id": "d366babc",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"1"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"a = 1\n", "a = 1\n",
"a" "a"
@ -42,21 +31,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"id": "87873ff4", "id": "87873ff4",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"1.0"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"b = 1.0\n", "b = 1.0\n",
"b" "b"
@ -64,21 +42,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"id": "98f34ab7", "id": "98f34ab7",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"'1'"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"c = \"1\"\n", "c = \"1\"\n",
"c" "c"
@ -102,7 +69,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"id": "86571601", "id": "86571601",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -275,28 +242,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"id": "afc36b4e", "id": "afc36b4e",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Comment tu t'appelles?fjdsklmq\n"
]
},
{
"data": {
"text/plain": [
"'fjdsklmq'"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"reponse = input(\"Comment tu t'appelles?\")\n", "reponse = input(\"Comment tu t'appelles?\")\n",
"reponse" "reponse"
@ -418,6 +367,14 @@
"\n", "\n",
" from math import sqrt" " from math import sqrt"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aae82c94",
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {

View File

@ -12,20 +12,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"id": "90f79825", "id": "90f79825",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Choisir un nombre (a): 2\n",
"Choisir un autre nombre(b): 4\n",
"a est plus petit que b\n"
]
}
],
"source": [ "source": [
"a = str(input(\"Choisir un nombre (a): \"))\n", "a = str(input(\"Choisir un nombre (a): \"))\n",
"b = str(input(\"Choisir un autre nombre(b): \"))\n", "b = str(input(\"Choisir un autre nombre(b): \"))\n",
@ -61,18 +51,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"id": "f719d9ac", "id": "f719d9ac",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"Combien ...12\n"
]
}
],
"source": [ "source": [
"nombre_adulte = int(input(\"Combien ...\"))\n", "nombre_adulte = int(input(\"Combien ...\"))\n",
"\n" "\n"
@ -142,26 +124,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"id": "b60a11dd", "id": "b60a11dd",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n",
"False\n",
"False\n",
"True\n",
"True\n",
"True\n",
"True\n",
"False\n",
"False\n"
]
}
],
"source": [ "source": [
"print(2 == 2)\n", "print(2 == 2)\n",
"print(2 == 3)\n", "print(2 == 3)\n",
@ -198,27 +164,10 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "3f3512da", "id": "3f3512da",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
"True\n",
"False\n",
"False\n",
"---------------\n",
"True\n",
"True\n",
"False\n",
"---------------\n",
"False\n",
"False\n"
]
}
],
"source": [ "source": [
"print(2 == 2 and 4 == 4)\n", "print(2 == 2 and 4 == 4)\n",
"print(2 == 2 and 3 == 4)\n", "print(2 == 2 and 3 == 4)\n",
@ -245,8 +194,13 @@
"id": "3a84f519", "id": "3a84f519",
"metadata": {}, "metadata": {},
"source": [ "source": [
"5. Programmer une IA au jeu Que-est-ce?\n", "5. Programmer une IA au jeu Qui-est-ce?\n",
"\n" "\n",
"Voici 4 visages.\n",
"\n",
"![visages](./fig/qui-est-ce.png)\n",
"\n",
"Ecrire un programme qui demande de choisir un personnage, pose 2 questions et qui arrive à déterminer le personnage choisis.\n"
] ]
}, },
{ {
@ -266,9 +220,9 @@
"\n", "\n",
"Déroulé du programme:\n", "Déroulé du programme:\n",
"\n", "\n",
"L'utilisateur choisit un nombre entre 0 (pierre), 1(feuille), 2(ciseau).\n", "- L'utilisateur choisit un nombre entre 0 (pierre), 1(feuille), 2(ciseau).\n",
"L'ordinateur choisit au hasard un nombre en 0 et 2 (vous pourrez utiliser `randint(0, 2)` pour faire cela.\n", "- L'ordinateur choisit au hasard un nombre en 0 et 2 (vous pourrez utiliser `randint(0, 2)` pour faire cela.\n",
"L'ordinateur détermine qui a gagné la partie" "- L'ordinateur détermine qui a gagné la partie"
] ]
}, },
{ {

View File

@ -29,7 +29,7 @@
"id": "9880d494", "id": "9880d494",
"metadata": {}, "metadata": {},
"source": [ "source": [
"##" "## Exercices"
] ]
}, },
{ {

View File

@ -1,7 +0,0 @@
\begin{exercise}[subtitle={<++>}, step={1}, origin={<++>}, topics={ Programmation }, tags={ Python }]
<++>
\end{exercise}
\begin{solution}
<++>
\end{solution}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB