Created
January 24, 2021 17:05
-
-
Save skarabasakis/65f4740a67fa8f95f3611adc5605010a to your computer and use it in GitHub Desktop.
conjugaison
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.8.5-final" | |
}, | |
"orig_nbformat": 2, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3.8.5 64-bit ('3.8.5')", | |
"metadata": { | |
"interpreter": { | |
"hash": "184656df050970c5761b0b4d99f8ba0bd95a54be05b57ae2e2aad5d429487dd0" | |
} | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2, | |
"cells": [ | |
{ | |
"source": [ | |
"# Conjugaison\n", | |
"\n", | |
"Un outil pour générer des exercices de conjugaison" | |
], | |
"cell_type": "markdown", | |
"metadata": {} | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Passé simple:\nil\ntu\nnous\n" | |
] | |
} | |
], | |
"source": [ | |
"import random\n", | |
"\n", | |
"TEMPS = ['Présent', 'Passé simple']\n", | |
"PRENOMS = ['je', 'tu', 'il', 'elle', 'on', 'nous', 'vouz', 'ils', 'elles']\n", | |
"\n", | |
"temps = random.choice(TEMPS)\n", | |
"prenoms = random.sample(PRENOMS, 3)\n", | |
"\n", | |
"print(f'{temps}:')\n", | |
"for prenom in prenoms:\n", | |
" print(prenom)" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment