<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
span.c1
        {mso-style-name:c1;}
span.k
        {mso-style-name:k;}
span.nf
        {mso-style-name:nf;}
span.p
        {mso-style-name:p;}
span.n
        {mso-style-name:n;}
span.o
        {mso-style-name:o;}
span.mi
        {mso-style-name:mi;}
span.nb
        {mso-style-name:nb;}
span.s1
        {mso-style-name:s1;}
span.gp
        {mso-style-name:gp;}
span.go
        {mso-style-name:go;}
span.vm
        {mso-style-name:vm;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I could see a bug in the Modules section page of Tutorial <a href="https://docs.python.org/3/tutorial/modules.html">
https://docs.python.org/3/tutorial/modules.html</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Below are the modules in Fibo.py<o:p></o:p></p>
<div style="mso-element:para-border-div;border:solid #AACC99 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt;background:#EEFFCC">
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<i><span style="font-size:11.5pt;font-family:"Courier New";color:#408090;mso-fareast-language:EN-GB"># Fibonacci numbers module</span></i><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<b><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">def</span></b><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#06287E;mso-fareast-language:EN-GB">fib</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">(n):   
</span><i><span style="font-size:11.5pt;font-family:"Courier New";color:#408090;mso-fareast-language:EN-GB"># write Fibonacci series up to n</span></i><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">    a, b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#208050;mso-fareast-language:EN-GB">0</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">,
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#208050;mso-fareast-language:EN-GB">1</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">   
</span><b><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">while</span></b><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB"><</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> n:<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">       
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">print</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">(b, end</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#4070A0;mso-fareast-language:EN-GB">'
 '</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">        a, b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> b, a</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">+</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">b<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">   
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">print</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">()<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<b><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">def</span></b><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#06287E;mso-fareast-language:EN-GB">fib2</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">(n):  
</span><i><span style="font-size:11.5pt;font-family:"Courier New";color:#408090;mso-fareast-language:EN-GB"># return Fibonacci series up to n</span></i><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">    result
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> []<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">    a, b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#208050;mso-fareast-language:EN-GB">0</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">,
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#208050;mso-fareast-language:EN-GB">1</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">   
</span><b><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">while</span></b><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB"><</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> n:<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">        result</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">.</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">append(b)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">        a, b
</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">=</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> b, a</span><span style="font-size:11.5pt;font-family:"Courier New";color:#666666;mso-fareast-language:EN-GB">+</span><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">b<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm">
<span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB">   
</span><b><span style="font-size:11.5pt;font-family:"Courier New";color:#007020;mso-fareast-language:EN-GB">return</span></b><span style="font-size:11.5pt;font-family:"Courier New";color:#333333;mso-fareast-language:EN-GB"> result<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The problem is with the below section:<o:p></o:p></p>
<p class="MsoNormal">Fib2(100) doesn’t print the data, it just returns the data. So it will first have to be assigned to a variable and then can print that variable.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:solid #AACC99 1.0pt;padding:4.0pt 4.0pt 4.0pt 4.0pt;background:#EEFFCC">
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="gp"><b><span style="font-size:11.5pt;color:#C65D09">>>> </span></b></span><span class="n"><span style="font-size:11.5pt;color:#333333">fibo</span></span><span class="o"><span style="font-size:11.5pt;color:#666666">.</span></span><span class="n"><span style="font-size:11.5pt;color:#333333">fib</span></span><span class="p"><span style="font-size:11.5pt;color:#333333">(</span></span><span class="mi"><span style="font-size:11.5pt;color:#208050">1000</span></span><span class="p"><span style="font-size:11.5pt;color:#333333">)</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="go"><span style="font-size:11.5pt;color:#333333">1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="gp"><b><span style="font-size:11.5pt;color:#C65D09">>>> </span></b></span><span class="n"><span style="font-size:11.5pt;color:#333333">fibo</span></span><span class="o"><span style="font-size:11.5pt;color:#666666">.</span></span><span class="n"><span style="font-size:11.5pt;color:#333333">fib2</span></span><span class="p"><span style="font-size:11.5pt;color:#333333">(</span></span><span class="mi"><span style="font-size:11.5pt;color:#208050">100</span></span><span class="p"><span style="font-size:11.5pt;color:#333333">)</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="go"><span style="font-size:11.5pt;color:#333333">[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="gp"><b><span style="font-size:11.5pt;color:#C65D09">>>> </span></b></span><span class="n"><span style="font-size:11.5pt;color:#333333">fibo</span></span><span class="o"><span style="font-size:11.5pt;color:#666666">.</span></span><span class="vm"><span style="font-size:11.5pt;color:#BB60D5">__name__</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
<pre style="line-height:13.9pt;background:#EEFFCC;border:none;padding:0cm"><span class="go"><span style="font-size:11.5pt;color:#333333">'fibo'</span></span><span style="font-size:11.5pt;color:#333333"><o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Pratik Surani<o:p></o:p></p>
<p class="MsoNormal">07565987160<o:p></o:p></p>
</div>
</body>
</html>