Feat: clean output
continuous-integration/drone/push Build is passing Details

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",
"execution_count": 6,
"execution_count": null,
"id": "6c462cdd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello les 2nd\n",
"4\n"
]
}
],
"outputs": [],
"source": [
"print(\"Hello les 2nd\")\n",
"a = 2\n",
@ -155,35 +146,7 @@
"execution_count": null,
"id": "8c4cabd7",
"metadata": {},
"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"
]
}
],
"outputs": [],
"source": [
"# Programme de la momie - tiré du livre les maths ensembles et pour chacun\n",
"from random import randint\n",

View File

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

View File

@ -12,20 +12,10 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "90f79825",
"metadata": {},
"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"
]
}
],
"outputs": [],
"source": [
"a = str(input(\"Choisir un nombre (a): \"))\n",
"b = str(input(\"Choisir un autre nombre(b): \"))\n",
@ -61,18 +51,10 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "f719d9ac",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Combien ...12\n"
]
}
],
"outputs": [],
"source": [
"nombre_adulte = int(input(\"Combien ...\"))\n",
"\n"
@ -142,26 +124,10 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "b60a11dd",
"metadata": {},
"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"
]
}
],
"outputs": [],
"source": [
"print(2 == 2)\n",
"print(2 == 3)\n",
@ -198,27 +164,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "3f3512da",
"metadata": {},
"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"
]
}
],
"outputs": [],
"source": [
"print(2 == 2 and 4 == 4)\n",
"print(2 == 2 and 3 == 4)\n",
@ -245,8 +194,13 @@
"id": "3a84f519",
"metadata": {},
"source": [
"5. Programmer une IA au jeu Que-est-ce?\n",
"\n"
"5. Programmer une IA au jeu Qui-est-ce?\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",
"Déroulé du programme:\n",
"\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 détermine qui a gagné la partie"
"- 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 détermine qui a gagné la partie"
]
},
{

View File

@ -29,7 +29,7 @@
"id": "9880d494",
"metadata": {},
"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