Base de connaissancesCentre d’examen
FRFrançais
Choisir la langue13

CKTIS / Python

Base de connaissances — Python

Syntaxe, opérateurs et concepts de programmation. Trouvez une explication, explorez un exemple et reprenez votre apprentissage.

Entrées : 583

Python

logging.INFO — niveau informatif

logging.INFO est la constante 20, qui désigne les événements survenant pendant le fonctionnement normal du programme. Utilisée comme seuil, elle accepte INFO et les niveaux supérieurs, mais exclut DEBUG.

Débutant · Python 3.14; repository image, production runtime not attested
Python

logging.Logger

Un Logger nommé obtenu par getLogger vérifie son niveau effectif et ses filtres avant de transmettre le record.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

LoggerAdapter.info — journalisation avec contexte

LoggerAdapter.info journalise un message INFO avec le contexte de l’adaptateur, par exemple un identifiant de requête. Découvrez la différence entre le traitement par défaut de extra et merge_extra=True.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

logging.StreamHandler

StreamHandler écrit le texte et le terminateur dans le flux fourni, par défaut sys.stderr, puis appelle flush.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

logging.warning

warning enregistre sur le journal racine un avertissement de niveau WARNING (30).

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.ceil

Renvoie le plus petit entier supérieur ou égal à x.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.comb

Compte les choix de k positions parmi n sans remise ni ordre.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.cos

Calcule le cosinus d’un angle en radians, abscisse sur le cercle unité.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.e

Fournit une approximation flottante du nombre d’Euler, base du logarithme naturel.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.factorial

Calcule la factorielle d’un entier positif ou nul.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.floor

Renvoie le plus grand entier qui ne dépasse pas x.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.fsum

Additionne les nombres flottants en gardant plusieurs sommes partielles.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.gcd

Renvoie le plus grand commun diviseur, positif ou nul, d’un nombre quelconque d’entiers.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.inf

Représente l’infini positif de type float.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.isclose

Teste si l’écart absolu reste sous la plus grande limite: tolérance absolue ou tolérance relative multipliée par le plus grand module, égalité comprise.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.isfinite

Reconnaît les nombres finis, y compris les deux zéros signés.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.isinf

Détecte précisément les infinis positif et négatif.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.isnan

Renvoie un booléen indiquant si l’argument est NaN.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.lcm

Calcule le plus petit commun multiple, positif ou nul, d’entiers.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.log

Calcule l’exposant auquel élever la base pour obtenir x.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.log10

Calcule le logarithme décimal pour comparer des ordres de grandeur.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.log2

Renvoie l’exposant de la puissance de deux correspondant à x.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.nan

Fournit la valeur flottante spéciale signalant l’absence de résultat numérique.

Intermédiaire · Python 3.14; repository image, production runtime not attested
Python

math.perm

Compte les choix ordonnés de k positions parmi n sans répétition.

Intermédiaire · Python 3.14; repository image, production runtime not attested