{"id":9960,"date":"2024-07-29T08:52:43","date_gmt":"2024-07-29T06:52:43","guid":{"rendered":"https:\/\/www.mathweb.fr\/euclide\/?p=9960"},"modified":"2024-07-29T08:59:51","modified_gmt":"2024-07-29T06:59:51","slug":"construire-un-tableau-de-valeurs-de-fonctions-en-python","status":"publish","type":"post","link":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/","title":{"rendered":"Construire un tableau de valeurs de fonctions en Python"},"content":{"rendered":"\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Construire un tableau de valeurs en  Python est chose ais\u00e9e \u00e0 l&rsquo;aide d&rsquo;une boucle \u00ab\u00a0for\u00a0\u00bb&#8230; Ais\u00e9 ? R\u00e9ellement ? Obtenir les images de plusieurs valeurs l&rsquo;est, mais construire un beau tableau l&rsquo;est-il ? Je ne vais pas vous parler de <a href=\"https:\/\/fr.wikipedia.org\/wiki\/LaTeX\" target=\"_blank\" rel=\"noreferrer noopener\">LaTeX<\/a> car je suis conscient que tout le monde ne passe pas par ce langage de programmation. Je vais rester en Python pur.<\/p>\n\n\n\n<!--more-->\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_87_1 counter-hierarchy ez-toc-counter ez-toc-white ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Au menu sur cette page...<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#La_boucle_%C2%AB_for_%C2%BB_pour_obtenir_les_valeurs\" >La boucle \u00ab\u00a0for\u00a0\u00bb pour obtenir les valeurs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#Construire_un_tableau_de_valeurs_de_fonctions_en_Python_en_formatant_laffichage\" >Construire un tableau de valeurs de fonctions en Python en formatant l&rsquo;affichage<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"La_boucle_%C2%AB_for_%C2%BB_pour_obtenir_les_valeurs\"><\/span>La boucle \u00ab\u00a0for\u00a0\u00bb pour obtenir les valeurs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Nous allons consid\u00e9rer une fonction quelconque <em>f<\/em>. Alors, pour calculer l&rsquo;image des nombres entiers compris entre -5 et 5 (par exemple) est facile:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"dracula\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def f(x):\n    return -300*x + 1\n\nfor x in range(-5,6):\n    print( x , f(x) )<\/pre>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Quand on ne s&rsquo;attarde pas  trop sur l&rsquo;affichage, tout devient tr\u00e8s simple&#8230;<\/p>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Mais si l&rsquo;on souhaite que l&rsquo;affichage soit plus soign\u00e9, c&rsquo;est autre chose!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Construire_un_tableau_de_valeurs_de_fonctions_en_Python_en_formatant_laffichage\"><\/span>Construire un tableau de valeurs de fonctions en Python en formatant l&rsquo;affichage<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Quand j&rsquo;\u00e9cris \u00ab\u00a0soigner l&rsquo;affichage\u00a0\u00bb, je veux dire obtenir ceci par exemple:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-medium\"><a href=\"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6.png\" data-fancybox=\"gallery\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"33\" src=\"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6-300x33.png\" alt=\"tableau de valeurs construit en Python\" class=\"wp-image-9961\" srcset=\"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6-300x33.png 300w, https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6-600x67.png 600w, https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6-768x86.png 768w, https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/image-6.png 862w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Il sera n\u00e9cessaire, pour obtenir ce r\u00e9sultat, d&rsquo;utiliser le formatage de cha\u00eenes de caract\u00e8res&#8230; et un peu de malice! Pour rappel, je vous parle de formatage de cha\u00eenes de caract\u00e8res <a href=\"https:\/\/www.mathweb.fr\/euclide\/le-formatage-dune-chaine-de-caracteres-en-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">sur cette page<\/a>.<\/p>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Voici un programme possible:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"dracula\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def f(x):\n    return -300*x + 1\n    \ndef tab(a,b):\n    L = [ f(x) for x in range(a,b+1) ]\n    M = max( [ abs(x) for  x in L ])\n    w = len( str(M) ) # largeur minimale des cellules du tableau\n    if w &lt; 4:\n        w = 4\n    if M not in L: # s'il y a un signe \"-\" devant le nombre le plus \"spacieux\"\n        w += 1\n        \n    top_line_col = ' ' + '-'*(w+2)\n    top_line = top_line_col * ( len(L) + 1 ) # ligne du haut\n    \n    formatage = '{:^'+str(w+2)+'}' # pour centrer les valeurs sur une colonne de taille w+2\n    \n    x_line = '|' + formatage.format('x') \n    for x in range(a,b+1):\n        x_line += '|' + formatage.format(x) \n    x_line += '|'\n    \n    y_line = '|' + formatage.format('f(x)') \n    for y in L:\n        y_line += '|' + formatage.format(y) \n    y_line += '|'\n    \n    tab = top_line + '\\n' + x_line + '\\n' + top_line + '\\n' + y_line + '\\n' + top_line\n    \n    return tab\n\nprint( tab(-5,5) )<\/pre>\n\n\n\n<p class=\"is-style-Paragraph-paragraph wp-block-paragraph\">Le bel avantage est ici que la taille des colonnes s&rsquo;adapte \u00e0 la grandeur des nombres.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Construire un tableau de valeurs en Python est chose ais\u00e9e \u00e0 l&rsquo;aide d&rsquo;une boucle \u00ab\u00a0for\u00a0\u00bb&#8230; Ais\u00e9 ? R\u00e9ellement ? Obtenir les images de plusieurs valeurs l&rsquo;est, mais construire un beau tableau l&rsquo;est-il ? Je ne vais pas vous parler de LaTeX car je suis conscient que tout le monde ne [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9963,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,5],"tags":[186],"class_list":["post-9960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mathematiques","category-python","tag-fonction"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Construire un tableau de valeurs de fonctions en Python - Mathweb.fr<\/title>\n<meta name=\"description\" content=\"Comment construire un beau tableau de valeurs en Python et l&#039;afficher dans la console? Si obtenir les images est facile, pas le formatage...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Construire un tableau de valeurs de fonctions en Python - Mathweb.fr\" \/>\n<meta property=\"og:description\" content=\"Comment construire un beau tableau de valeurs en Python et l&#039;afficher dans la console? Si obtenir les images est facile, pas le formatage...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Mathweb.fr\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-29T06:52:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-29T06:59:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"740\" \/>\n\t<meta property=\"og:image:height\" content=\"198\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"St\u00e9phane Pasquet\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"St\u00e9phane Pasquet\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/\"},\"author\":{\"name\":\"St\u00e9phane Pasquet\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#\\\/schema\\\/person\\\/e4d3bb07968238378f0d5052a70dcd69\"},\"headline\":\"Construire un tableau de valeurs de fonctions en Python\",\"datePublished\":\"2024-07-29T06:52:43+00:00\",\"dateModified\":\"2024-07-29T06:59:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/\"},\"wordCount\":221,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#\\\/schema\\\/person\\\/e4d3bb07968238378f0d5052a70dcd69\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/head-articles-python-tableau-valeurs.jpg\",\"keywords\":[\"fonction\"],\"articleSection\":[\"Math\u00e9matiques\",\"Python\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/\",\"url\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/\",\"name\":\"Construire un tableau de valeurs de fonctions en Python - Mathweb.fr\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/head-articles-python-tableau-valeurs.jpg\",\"datePublished\":\"2024-07-29T06:52:43+00:00\",\"dateModified\":\"2024-07-29T06:59:51+00:00\",\"description\":\"Comment construire un beau tableau de valeurs en Python et l'afficher dans la console? Si obtenir les images est facile, pas le formatage...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/head-articles-python-tableau-valeurs.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/head-articles-python-tableau-valeurs.jpg\",\"width\":740,\"height\":198,\"caption\":\"tableau valeurs fonction python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/2024\\\/07\\\/29\\\/construire-un-tableau-de-valeurs-de-fonctions-en-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Construire un tableau de valeurs de fonctions en Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#website\",\"url\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/\",\"name\":\"Mathweb.fr\",\"description\":\"Math\u00e9matiques, LaTeX et Python\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#\\\/schema\\\/person\\\/e4d3bb07968238378f0d5052a70dcd69\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/#\\\/schema\\\/person\\\/e4d3bb07968238378f0d5052a70dcd69\",\"name\":\"St\u00e9phane Pasquet\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/cropped-logo-mathweb.webp\",\"url\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/cropped-logo-mathweb.webp\",\"contentUrl\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/cropped-logo-mathweb.webp\",\"width\":74,\"height\":77,\"caption\":\"St\u00e9phane Pasquet\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.mathweb.fr\\\/euclide\\\/wp-content\\\/uploads\\\/2025\\\/06\\\/cropped-logo-mathweb.webp\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Construire un tableau de valeurs de fonctions en Python - Mathweb.fr","description":"Comment construire un beau tableau de valeurs en Python et l'afficher dans la console? Si obtenir les images est facile, pas le formatage...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/","og_locale":"fr_FR","og_type":"article","og_title":"Construire un tableau de valeurs de fonctions en Python - Mathweb.fr","og_description":"Comment construire un beau tableau de valeurs en Python et l'afficher dans la console? Si obtenir les images est facile, pas le formatage...","og_url":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/","og_site_name":"Mathweb.fr","article_published_time":"2024-07-29T06:52:43+00:00","article_modified_time":"2024-07-29T06:59:51+00:00","og_image":[{"width":740,"height":198,"url":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg","type":"image\/jpeg"}],"author":"St\u00e9phane Pasquet","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"St\u00e9phane Pasquet","Dur\u00e9e de lecture estim\u00e9e":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#article","isPartOf":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/"},"author":{"name":"St\u00e9phane Pasquet","@id":"https:\/\/www.mathweb.fr\/euclide\/#\/schema\/person\/e4d3bb07968238378f0d5052a70dcd69"},"headline":"Construire un tableau de valeurs de fonctions en Python","datePublished":"2024-07-29T06:52:43+00:00","dateModified":"2024-07-29T06:59:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/"},"wordCount":221,"commentCount":0,"publisher":{"@id":"https:\/\/www.mathweb.fr\/euclide\/#\/schema\/person\/e4d3bb07968238378f0d5052a70dcd69"},"image":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg","keywords":["fonction"],"articleSection":["Math\u00e9matiques","Python"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/","url":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/","name":"Construire un tableau de valeurs de fonctions en Python - Mathweb.fr","isPartOf":{"@id":"https:\/\/www.mathweb.fr\/euclide\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#primaryimage"},"image":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg","datePublished":"2024-07-29T06:52:43+00:00","dateModified":"2024-07-29T06:59:51+00:00","description":"Comment construire un beau tableau de valeurs en Python et l'afficher dans la console? Si obtenir les images est facile, pas le formatage...","breadcrumb":{"@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#primaryimage","url":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg","contentUrl":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2024\/07\/head-articles-python-tableau-valeurs.jpg","width":740,"height":198,"caption":"tableau valeurs fonction python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mathweb.fr\/euclide\/2024\/07\/29\/construire-un-tableau-de-valeurs-de-fonctions-en-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.mathweb.fr\/euclide\/"},{"@type":"ListItem","position":2,"name":"Construire un tableau de valeurs de fonctions en Python"}]},{"@type":"WebSite","@id":"https:\/\/www.mathweb.fr\/euclide\/#website","url":"https:\/\/www.mathweb.fr\/euclide\/","name":"Mathweb.fr","description":"Math\u00e9matiques, LaTeX et Python","publisher":{"@id":"https:\/\/www.mathweb.fr\/euclide\/#\/schema\/person\/e4d3bb07968238378f0d5052a70dcd69"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mathweb.fr\/euclide\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":["Person","Organization"],"@id":"https:\/\/www.mathweb.fr\/euclide\/#\/schema\/person\/e4d3bb07968238378f0d5052a70dcd69","name":"St\u00e9phane Pasquet","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2025\/06\/cropped-logo-mathweb.webp","url":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2025\/06\/cropped-logo-mathweb.webp","contentUrl":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2025\/06\/cropped-logo-mathweb.webp","width":74,"height":77,"caption":"St\u00e9phane Pasquet"},"logo":{"@id":"https:\/\/www.mathweb.fr\/euclide\/wp-content\/uploads\/2025\/06\/cropped-logo-mathweb.webp"}}]}},"_links":{"self":[{"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/posts\/9960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/comments?post=9960"}],"version-history":[{"count":0,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/posts\/9960\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/media\/9963"}],"wp:attachment":[{"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/media?parent=9960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/categories?post=9960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mathweb.fr\/euclide\/wp-json\/wp\/v2\/tags?post=9960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}