python:hasard:start

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
python:hasard:start [2019/10/12 17:21] – créée physixpython:hasard:start [2020/07/24 03:31] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 ====== Hasard ====== ====== Hasard ======
 +
 +[[http://www.python-simple.com/python-modules-math/random.php|http://www.python-simple.com/python-modules-math/random.php]]
  
 random.random() : valeur entre 0 et 1, 1 exclus. random.random() : valeur entre 0 et 1, 1 exclus.
Ligne 5: Ligne 7:
 \\ \\
 random.randint(0, 3) : entier entre 0 et 3 inclus. random.randint(0, 3) : entier entre 0 et 3 inclus.
 +
 +random.choice(['a', 'b', 'c'])
  
  
  • python/hasard/start.1570893707.txt.gz
  • Dernière modification : 2020/07/24 00:23
  • (modification externe)