<jupyter_start><jupyter_text>Affichagehttps://python.sdv.univ-paris-diderot.fr/03_affichage/La fonction `print()`<jupyter_code>print("Salut Python")
print(42)
nombre = 3.14
print(nombre)<jupyter_output><empty_output><jupyter_text>Avec plusieurs arguments :<jupyter_code>name = "Jean" 
age = 20
print(name)
print(age)
print(name, age)
print(name, "a", age, "ans")<jupyter_output><empty_output><jupyter_text>Écriture formatée<jupyter_code>print("{} a {} ans".format(name, age))<jupyter_output><empty_output><jupyter_text>Contrôler le nombre de chiffres après la virgule :<jupyter_code>i = 34.7879783705980890
print(i)<jupyter_output><empty_output><jupyter_text>Avec deux chiffres après la virgule :<jupyter_code>print("{:.2f}".format(i))<jupyter_output><empty_output><jupyter_text>Avec trois chiffres après la virgule :<jupyter_code>print("{:.3f}".format(i))<jupyter_output><empty_output><jupyter_text>Contrôler l'alignement et la taille<jupyter_code>print("Salut {:>10s} !".format(name))
print("Salut {:*>10s} !".format(name))
print("Salut {:<10s} !".format(name))
print("Salut {:^10s} !".format(name))
print("Salut {:*^10s} !".format(name))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17692307692307693, 'fraction_numerical': 0.03333333333333333, 'mean_word_length': 11.591397849462366, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 31, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '406927', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 520, 'n_tokens_neox': 488, 'n_words': 66, 'path': '2_affichage.ipynb', 'repo_name': 'pierrepo/ibi-python', 'size': '1170'}