Commit 42e9765c authored by Jérôme Ortais's avatar Jérôme Ortais
Browse files

Ajout de la classe SquareRoot quie permet de calculer avec des racines

carrées.
Ajout de deux exercices sur le second degré en 1re S :
- forme canonique
- racines
parent ea5eb0cc
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 95271c4ee4dd770a40d7c38725ac9705
config: cfacfba087dd2cb10cc0affaed3ada3b
tags: 645f666f9bcd5a90fca523b33c5a78b7
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vue d&#39;ensemble : code du module &mdash; Documentation de Pyromaths 14.06.2</title>
<title>Vue d&#39;ensemble : code du module &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,11 +28,11 @@
<script type="text/javascript" src="../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>Vue d&#39;ensemble : code du module</span></h2>
</div>
<div class="topnav">
......@@ -48,6 +48,7 @@
<h1>Modules pour lesquels le code est disponible</h1>
<ul><li><a href="pyromaths/classes/Fractions.html">pyromaths.classes.Fractions</a></li>
<li><a href="pyromaths/classes/PolynomesCollege.html">pyromaths.classes.PolynomesCollege</a></li>
<li><a href="pyromaths/classes/SquareRoot.html">pyromaths.classes.SquareRoot</a></li>
<li><a href="pyromaths/ex/troisiemes/notion_de_fonction.html">pyromaths.ex.troisiemes.notion_de_fonction</a></li>
<li><a href="pyromaths/outils/Affichage.html">pyromaths.outils.Affichage</a></li>
<li><a href="pyromaths/outils/Arithmetique.html">pyromaths.outils.Arithmetique</a></li>
......@@ -66,7 +67,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.classes.Fractions &mdash; Documentation de Pyromaths 14.06.2</title>
<title>pyromaths.classes.Fractions &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>pyromaths.classes.Fractions</span></h2>
</div>
<div class="topnav">
......@@ -72,6 +72,7 @@
<span class="kn">from</span> <span class="nn">pyromaths.outils.Arithmetique</span> <span class="kn">import</span> <span class="n">pgcd</span><span class="p">,</span> <span class="n">ppcm</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">Counter</span>
<span class="kn">from</span> <span class="nn">pyromaths.classes.SquareRoot</span> <span class="kn">import</span> <span class="n">SquareRoot</span>
<div class="viewcode-block" id="Fraction"><a class="viewcode-back" href="../../../pyromaths.classes.Fractions.html#pyromaths.classes.Fractions.Fraction">[docs]</a><span class="k">class</span> <span class="nc">Fraction</span><span class="p">():</span>
<span class="sd">&quot;&quot;&quot;Cette classe crée la notion de fractions.</span>
......@@ -684,8 +685,23 @@
<span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">)</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">if</span> <span class="n">conv</span> <span class="p">:</span> <span class="bp">self</span> <span class="o">=</span> <span class="n">Fraction</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">)</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">False</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">,</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="n">s</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="o">.</span><span class="n">simplifie</span><span class="p">()</span>
<span class="k">if</span> <span class="n">s</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">=</span> <span class="n">s</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">,</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="n">s</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">simplifie</span><span class="p">()</span>
<span class="k">if</span> <span class="n">s</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">=</span> <span class="n">s</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">if</span> <span class="n">conv</span><span class="p">:</span> <span class="k">return</span> <span class="bp">self</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">pgcd</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">)</span>
<span class="k">return</span> <span class="n">Fraction</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">//</span> <span class="n">s</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">//</span> <span class="n">s</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">!=</span> <span class="n">s</span><span class="p">:</span>
<span class="k">return</span> <span class="n">Fraction</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">//</span> <span class="n">s</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">//</span> <span class="n">s</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">//</span> <span class="n">s</span>
</div>
<div class="viewcode-block" id="Fraction.decompose"><a class="viewcode-back" href="../../../pyromaths.classes.Fractions.html#pyromaths.classes.Fractions.Fraction.decompose">[docs]</a> <span class="k">def</span> <span class="nf">decompose</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;**decompose**\ (*object*)</span>
......@@ -701,6 +717,19 @@
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">,</span> <span class="nb">str</span><span class="p">):</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">)</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">False</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">,</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="n">s</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="o">.</span><span class="n">simplifie</span><span class="p">()</span>
<span class="k">if</span> <span class="n">s</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">=</span> <span class="n">s</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">,</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="n">s</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="o">.</span><span class="n">simplifie</span><span class="p">()</span>
<span class="k">if</span> <span class="n">s</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">=</span> <span class="n">s</span>
<span class="n">conv</span> <span class="o">=</span> <span class="bp">True</span>
<span class="k">if</span> <span class="n">conv</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">n</span><span class="p">:</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">else</span><span class="p">:</span>
......@@ -708,7 +737,7 @@
<span class="k">if</span> <span class="n">lepgcd</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">Fraction</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%s</span><span class="s">*</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">//</span> <span class="n">lepgcd</span><span class="p">,</span> <span class="n">lepgcd</span><span class="p">),</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">*</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">//</span> <span class="n">lepgcd</span><span class="p">,</span> <span class="n">lepgcd</span><span class="p">),</span> <span class="s">&quot;s&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">Fraction</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%r</span><span class="s">*</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">n</span> <span class="o">//</span> <span class="n">lepgcd</span><span class="p">,</span> <span class="n">lepgcd</span><span class="p">),</span> <span class="s">&quot;</span><span class="si">%r</span><span class="s">*</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">d</span> <span class="o">//</span> <span class="n">lepgcd</span><span class="p">,</span> <span class="n">lepgcd</span><span class="p">),</span> <span class="s">&quot;s&quot;</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="Fraction.traitement"><a class="viewcode-back" href="../../../pyromaths.classes.Fractions.html#pyromaths.classes.Fractions.Fraction.traitement">[docs]</a> <span class="k">def</span> <span class="nf">traitement</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">final</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;**traitement**\ (*object*,\ *self*)</span>
......@@ -760,7 +789,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Affichage &mdash; Documentation de Pyromaths 14.06.2</title>
<title>pyromaths.outils.Affichage &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Affichage</span></h2>
</div>
<div class="topnav">
......@@ -241,7 +241,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Arithmetique &mdash; Documentation de Pyromaths 14.06.2</title>
<title>pyromaths.outils.Arithmetique &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Arithmetique</span></h2>
</div>
<div class="topnav">
......@@ -88,6 +88,7 @@
<span class="sd"> :rtype: integer</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">pyromaths.classes.SquareRoot</span> <span class="kn">import</span> <span class="n">SquareRoot</span>
<span class="k">def</span> <span class="nf">_pgcd</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
<span class="c">#=======================================================================</span>
<span class="c"># print &quot;pgcd dans arithmetique &quot;, a, b, isinstance(a, int), isinstance(b, int)</span>
......@@ -96,8 +97,19 @@
<span class="k">if</span> <span class="nb">abs</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="o">==</span> <span class="nb">float</span><span class="p">(</span><span class="s">&#39;inf&#39;</span><span class="p">)</span> <span class="ow">or</span> <span class="nb">abs</span><span class="p">(</span><span class="n">b</span><span class="p">)</span> <span class="o">==</span> <span class="nb">float</span><span class="p">(</span><span class="s">&#39;inf&#39;</span><span class="p">):</span> <span class="k">return</span> <span class="mi">1</span>
<span class="k">while</span> <span class="n">b</span><span class="p">:</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">b</span><span class="p">,</span> <span class="n">a</span> <span class="o">%</span> <span class="n">b</span>
<span class="k">return</span> <span class="n">a</span>
<span class="c"># Pour pouvoir utiliser pgcd(a) où a=(2,4,6) :</span>
<span class="n">n</span> <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)):</span> <span class="n">n</span> <span class="o">=</span> <span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="c"># Pour pouvoir utiliser pgcd(a) où a=(2,4,6)</span>
<span class="c"># Pour chercher à simplifier une fraction avec un objet SquareRoot</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">pgcd</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">]))])</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">SquareRoot</span><span class="p">):</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">pgcd</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="n">i</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">]))])</span>
<span class="k">else</span><span class="p">:</span> <span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">][</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">]</span>
<span class="n">p</span> <span class="o">=</span> <span class="n">_pgcd</span><span class="p">(</span><span class="n">n</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">n</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">n</span><span class="p">[</span><span class="mi">2</span><span class="p">:]:</span>
<span class="n">p</span> <span class="o">=</span> <span class="n">_pgcd</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
......@@ -402,7 +414,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pyromaths.outils.Conversions &mdash; Documentation de Pyromaths 14.06.2</title>
<title>pyromaths.outils.Conversions &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="../../../_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../../',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,12 +28,12 @@
<script type="text/javascript" src="../../../_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="../../../_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="../../../index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="../../../index.html" />
<link rel="up" title="Code du module" href="../../index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="../../../_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="../../../index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>pyromaths.outils.Conversions</span></h2>
</div>
<div class="topnav">
......@@ -116,7 +116,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -10,11 +10,4 @@ Un objet Polynome peut être construit à partir d'une liste et d'une chaîne co
:special-members:
.. :private-members:
:undoc-members:
:show-inheritance:
.. automodule:: pyromaths.classes.PolynomesCollege
:members:
:special-members:
:undoc-members:
.. :private-members:
:show-inheritance:
\ No newline at end of file
......@@ -6,4 +6,4 @@ Les classes de Pyromaths
pyromaths.classes.Fractions
pyromaths.classes.PolynomesCollege
pyromaths.classes.SquareRoot
This diff is collapsed.
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bienvenue ! &mdash; Documentation de Pyromaths 14.06.2</title>
<title>Bienvenue ! &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,12 +28,12 @@
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="#" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="#" />
<link rel="next" title="1. Introduction" href="intro.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="#">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>Bienvenue !</span></h2>
</div>
<div class="topnav">
......@@ -58,6 +58,7 @@
<li class="toctree-l1"><a class="reference internal" href="pyromaths.classes.html">2. Les classes de Pyromaths</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pyromaths.classes.Fractions.html">2.1. <tt class="docutils literal"><span class="pre">Fractions</span></tt> &#8212; Nombres rationnels</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyromaths.classes.PolynomesCollege.html">2.2. <tt class="docutils literal"><span class="pre">PolynomesCollege</span></tt> &#8212; Fonctions polynômes</a></li>
<li class="toctree-l2"><a class="reference internal" href="pyromaths.classes.SquareRoot.html">2.3. <tt class="docutils literal"><span class="pre">SquareRoot</span></tt> &#8212; Objet racine carrée</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pyromaths.outils.html">3. Les outils de Pyromaths</a><ul>
......@@ -97,7 +98,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>1. Introduction &mdash; Documentation de Pyromaths 14.06.2</title>
<title>1. Introduction &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,13 +28,13 @@
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="index.html" />
<link rel="next" title="2. Les classes de Pyromaths" href="pyromaths.classes.html" />
<link rel="prev" title="Bienvenue !" href="index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>1. Introduction</span></h2>
</div>
<div class="topnav">
......@@ -71,7 +71,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Index des modules Python &mdash; Documentation de Pyromaths 14.06.2</title>
<title>Index des modules Python &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,14 +28,14 @@
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="index.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>Index des modules Python</span></h2>
</div>
<div class="topnav">
......@@ -70,11 +70,6 @@
<td>&nbsp;&nbsp;&nbsp;
<a href="pyromaths.classes.Fractions.html#module-pyromaths.classes.Fractions"><tt class="xref">pyromaths.classes.Fractions</tt></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
<a href="pyromaths.classes.PolynomesCollege.html#module-pyromaths.classes.PolynomesCollege"><tt class="xref">pyromaths.classes.PolynomesCollege</tt></a></td><td>
<em></em></td></tr>
<tr class="cg-1">
<td></td>
<td>&nbsp;&nbsp;&nbsp;
......@@ -114,7 +109,7 @@
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2.1. Fractions — Nombres rationnels &mdash; Documentation de Pyromaths 14.06.2</title>
<title>2.1. Fractions — Nombres rationnels &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,14 +28,14 @@
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="index.html" />
<link rel="up" title="2. Les classes de Pyromaths" href="pyromaths.classes.html" />
<link rel="next" title="2.2. PolynomesCollege — Fonctions polynômes" href="pyromaths.classes.PolynomesCollege.html" />
<link rel="prev" title="2. Les classes de Pyromaths" href="pyromaths.classes.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>
<span>Documentation de Pyromaths 14.10</span></a></h1>
<h2 class="heading"><span>2.1. Fractions — Nombres rationnels</span></h2>
</div>
<div class="topnav">
......@@ -480,7 +480,7 @@ Si <em>final</em> est vrai, alors essaie de simplifier la fraction.</p>
<div class="footer">
&copy; Copyright 2013-2014, Jérôme Ortais.
Mis à jour le 14 juin 2014.
Mis à jour le 24 déc. 2014.
Créé avec <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
......
......@@ -7,7 +7,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2. Les classes de Pyromaths &mdash; Documentation de Pyromaths 14.06.2</title>
<title>2. Les classes de Pyromaths &mdash; Documentation de Pyromaths 14.10</title>
<link rel="stylesheet" href="_static/haiku.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
......@@ -16,7 +16,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '14.06.2',
VERSION: '14.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
......@@ -28,13 +28,13 @@
<script type="text/javascript" src="_static/translations.js"></script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/theme_extras.js"></script>
<link rel="top" title="Documentation de Pyromaths 14.06.2" href="index.html" />
<link rel="top" title="Documentation de Pyromaths 14.10" href="index.html" />
<link rel="next" title="2.1. Fractions — Nombres rationnels" href="pyromaths.classes.Fractions.html" />
<link rel="prev" title="1. Introduction" href="intro.html" />
</head>
<body>
<div class="header"><img class="rightlogo" src="_static/bandeau.png" alt="Logo"/><h1 class="heading"><a href="index.html">
<span>Documentation de Pyromaths 14.06.2</span></a></h1>