Librairie simpliste de manipulation de tableaux a des fins d'enseignement de l'algorithmique
Project description
Librairie bibTableau
Cette librairie est destinée aux étudiants des UEs d'initiation à l'algorithmique de l'université de Bordeaux. Sa publication sur pypi vise à faciliter l'installation de la librairie par les étudiants en séance de travux pratiques.
Une librairie minimaliste
La librairie a un objectif pédagogique précis:
- Faire en sorte que les étuiants manipule des tableaux comme si ceux-ci était typés et nécessitait la déclaration de leur taille.
La librarie ne contient que trois fonctions:
- La fonction
creerTableaucrée un tableau de taillenombreElements- utilisation:
creerTableau(10)oucreerTableau(10,-1)
- utilisation:
def creerTableau(nombreElements,valeurInitiale=None ):
return [valeurInitiale]*nombreElements
- La fonction
creerTableaualeatoirecrée un tableau denombreElementséléments tirés aléatoirement dans l'intervalle[borneInf, borneSup]- utilisation:
creerTableauAleatoire(10)oucreerTableauAleatoire(10,-50,-10)
- utilisation:
def creerTableauAleatoire(nombreElements,borneInf=-50, borneSup=50):
t = creerTableau(nombreElements)
for i in range (nombreElements):
t[i] = random.randint(borneInf,borneSup)
return t
- La fonction
creerTableauMonotonecrée un tableau denombreElementséléments tirés aléatoirement dans l'intervalle[borneInf, borneSup]- si
variationest positif (resp. négatif), le tableau est croissant (resp. décroissant) - utilisation:
creerTableauMonotone(10)oucreerTableauMonotone(10,-1)
- si
def creerTableauMonotone(nombreElements, variation = 1,borneInf=-1000, borneSup=1000):
t = creerTableauAleatoire(nombreElements,borneInf,borneSup)
var = variation < 0
return sorted(t,reverse = var)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bibtableau-0.1.1.tar.gz.
File metadata
- Download URL: bibtableau-0.1.1.tar.gz
- Upload date:
- Size: 1.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24cf627be483b57fa8c8834c78530a48edad3a426277ff7411f8dd99bd7e905b
|
|
| MD5 |
0d11e01b7021f93b430b32438db8eb7b
|
|
| BLAKE2b-256 |
b94d2f53a285327ffc970bf18df5403451f2bbaa4693d3fbd24d5b12309f9f29
|
File details
Details for the file bibtableau-0.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: bibtableau-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.5 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae9e8abc7910727705c4caef9ec31fa606fda46757fc20af4de7e3462ebdc4eb
|
|
| MD5 |
64be306c84d08f237f0f254bfce37a89
|
|
| BLAKE2b-256 |
95bd1a52107e5734697c15113dea851d7cdc3a0c13b4ded362812ae7e990f808
|